User Guide

Label Sets

Learn how to create and use label sets for document structure annotation.

Label Sets

This guide covers creating, managing, and using label sets to define document structure for your annotations in the editor.

Understanding Label Sets

Label sets define the document structure for annotations, specifying how regions are categorized within the editor and exported in XML format.

What Are Labels?

Labels are structural classifications that you apply to regions in the editor. They define the semantic type of each annotated region.

Label Sets vs Tag Sets

AspectLabel SetsTag Sets
LocationEditor (annotation regions)Dashboard (Projects, Pages)
PurposeDefine document structureOrganize projects/pages
Applied ToAnnotation regionsProjects, Pages
Example<TextRegion>, <IllustrationRegion>"Important", "Urgent", "Review"

When to Use Labels

  • Classifying regions by semantic type (text, illustration, etc.)
  • Defining document structure for XML export
  • Creating ground truth for machine learning
  • Preparing data for OCR correction
  • Structured metadata for digital archives

Supported Formats

PAGE (Page Analysis and Ground-Truth Elements)

LAREX primarily uses the PAGE XML format for annotations:

<pc:Pagina xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15">
  <pc:Page imageFilename="page001.jpg">
    <pc:PrintSpace>
      <pc:TextRegion type="paragraph">
        <pc:TextLine>
          <pc:Word>
            <pc:Unicode>Sample</pc:Unicode>
          </pc:Word>
        </pc:TextLine>
      </pc:TextRegion>
      <pc:IllustrationRegion>
        <pc:Coords points="100,100;200,100;200,200;100,200"/>
      </pc:IllustrationRegion>
    </pc:PrintSpace>
  </pc:Page>
</pc:Pagina>

ALTO Compatibility

ALTO (Analysis and Layout Tool) export is planned for future implementation:

  • Currently under development
  • Will support ALTO 4.0 format
  • Will include conversion from PAGE labels

Accessing Label Sets

From the Library

  1. Navigate to the Library
  2. Open the sidebar
  3. Click Label Sets

From Project Settings

  1. Open project settings
  2. Navigate to Label Set section
  3. Select or create label set

From the Editor

  1. Open a project in the editor
  2. Select a region
  3. In the Properties panel, use the Label dropdown

Creating Label Sets

Creating a New Label Set

  1. Click Create Label Set
  2. Enter a name
  3. Optional: Add description
  4. Click Create

Label Set Properties

PropertyDescription
NameLabel set name
DescriptionPurpose of the label set

Label Set Components

ComponentDescription
Region TypesTypes of regions to define
AttributesXML attributes for elements

Managing Labels

Adding Labels

  1. Open the label set for editing
  2. Click Add Label
  3. Configure label properties:
    • Name: Label identifier
    • Display Name: Shown in editor UI
    • Description: Human-readable description
    • Color: Editor highlight color
  4. Click Save

Label Properties

PropertyDescription
NameLabel identifier
Display NameShown in editor UI
DescriptionUsage notes
ColorEditor highlight color

Common Label Types

PAGE Region Types

LabelDescription
TextRegionRegion containing text
IllustrationRegionImage or graphic
TableRegionTabular content
SeparatorRegionDivider, line
ChartRegionGraph or chart
ChemRegionChemical formula
MusicRegionMusical notation
MapRegionMap or geographic content
TextBoxNon-text box element
WordIndividual word (optional)
GlyphIndividual glyph (optional)
GraphemeGrapheme cluster (optional)

Editing Labels

  1. Find the label in the label set
  2. Click the edit icon
  3. Modify properties
  4. Click Save

Deleting Labels

Deleting a label removes it from all regions. Consider using a different label instead.
  1. Find the label in the label set
  2. Click the delete icon
  3. Confirm deletion

Applying Labels to Regions

Selecting Labels

  1. Select one or more regions in the editor
  2. Open the Label Selector in the Properties panel
  3. Select a label type
  4. Label is applied to regions

Label Display

ElementDescription
HighlightColor-coded region outline
TooltipLabel name on hover
Properties PanelCurrent label shown

Changing Labels

  1. Select region with existing label
  2. In Properties panel, select new label
  3. Label is updated

Bulk Label Application

  1. Select multiple regions
  2. Open Label Selector
  3. Select label
  4. Apply to all selected

Output Configuration

Export Settings

Configure XML export:

SettingDescription
NamespaceXML namespace for elements
AttributesInclude custom attributes
EncodingCharacter encoding (UTF-8)

Custom Attributes

Add custom attributes to elements:

  1. Open label properties
  2. Navigate to Attributes tab
  3. Add attribute:
    • Name: Attribute name
    • Value: Fixed or variable
  4. Save attribute

Output Preview

Preview XML output:

  1. Click Preview tab
  2. Select a region
  3. View XML representation

Best Practices

Label Naming

  1. Use Standard Names: Follow PAGE format conventions
  2. Be Consistent: Same naming across label sets
  3. Be Descriptive: Clear, meaningful names
  4. Avoid Spaces: Use underscores or camelCase

Structure Design

GuidelineDescription
Standard TypesUse established PAGE labels
Minimal DepthAvoid unnecessary nesting
Document PurposeMatch to use case

PAGE Best Practices

  • Use standard PAGE region types
  • Include required attributes (ID, type)
  • Define coordinates accurately
  • Set reading order via reading order tool

Troubleshooting

Labels Not Exporting

Problem: Labels don't appear in XML output

Solutions:

  1. Verify label set is assigned to project
  2. Check label mapping in export settings
  3. Ensure regions have labels assigned

Invalid XML Output

Problem: Export produces invalid XML

Solutions:

  1. Check for special characters in text
  2. Verify namespace declarations
  3. Validate against PAGE schema

Missing Labels

Problem: Can't find label in selector

Solutions:

  1. Check if label exists in label set
  2. Verify label set is active
  3. Refresh editor view

Keyboard Shortcuts

ShortcutAction
LOpen label selector
Ctrl + LApply last label
EscClose label selector

Next Steps

Copyright © 2026