For the complete documentation index, see llms.txt. This page is also available as Markdown.

Text Annotation

Create entities, nested spans, classifications, relations, and structured properties for NLP and LLM datasets.

Unitlab’s text Workbench keeps source text, span boundaries, entity identity, relations, classifications, and document-level context in one governed task. It supports precise named-entity recognition as well as nested and overlapping spans that simpler labeling interfaces cannot represent safely.

Use this guide when: you are building NER, relation extraction, intent, sentiment, classification, information-extraction, or LLM training datasets.

See text annotation in action

The demo shows text selection, entity labeling, and structured review within the current Unitlab interface.

Open the demo in a new tab.

Before you begin

  1. Create or select a project whose data and ontology match this modality.

  2. Confirm the project instructions define the unit of annotation, boundary or timing policy, required properties, and review route.

  3. Open the project and enter the assigned item from the project data view or queue. The Workbench loads the modality-native editor inside the shared Unitlab shell.

See Annotation Workbench for navigation, saving, item state, comments, issues, and workflow actions.

Understand the text work surface

The text editor keeps the source document readable while exposing ontology classes and structured values. Annotators select exact character spans, assign entity classes, connect entities with relations, and complete item-level classifications without rewriting the source content.

Text with person, organization, location, topic, and arbitrary span annotations

Entity labels preserve exact source spans while keeping surrounding language available for interpretation.

Supported annotation model

Annotation type
Use it for

Named entity

A typed span such as person, organization, location, product, date, or domain concept.

Arbitrary span

A project-defined phrase or token sequence that does not fit a standard entity taxonomy.

Nested or overlapping entity

Independent labels whose character ranges partially or fully overlap.

Relation

A directed or undirected connection between two annotated entities.

Text classification

Intent, sentiment, topic, risk, or another label for the complete item.

Entity property

Structured information that belongs to one entity.

Item Property

Document-level context, source, quality, language, or other whole-item value.

Span boundaries should follow a written policy for punctuation, articles, possessives, whitespace, and repeated mentions. The ontology defines meaning; visual highlight color alone does not.

Relationships and entity linking

Select the source entity and create the ontology-defined relation to the intended target. Review relation direction, cardinality, and scope; a correct pair connected in the wrong direction is still structurally wrong. Use relations for facts such as works-for, located-in, refers-to, part-of, or any project-specific link.

Directional relationships linking a person, organization, and location

Relations turn isolated spans into a structured graph that downstream models can learn from.

Advanced text ontologies

Combine entity classes with nested properties, Item Properties, and controlled relations. Required values make incomplete annotations visible before submission. Reuse the ontology across projects when class definitions and value rules must remain stable.

Text ontology with entities, attributes, relations, and Item Properties

A structured ontology separates span location from semantic meaning and document-level context.

Nested, overlapping, and context-aware annotation

Create each valid label independently when entities overlap or one entity contains another. Preserve sentence, paragraph, and document context during review. For repeated mentions, follow the project’s coreference and mention policy rather than assuming the first label applies everywhere. AI-assisted proposals should be corrected against the source text, not accepted from confidence alone.

Annotate one production item

1

1. Read the full context

Review the item, instructions, language, and Item Properties before selecting the first span. Resolve whether the task is mention-level, entity-level, or document-level.

2

2. Select the exact span

Highlight only the characters required by the boundary policy and choose the ontology class. Reopen the selection if punctuation or whitespace is wrong.

3

3. Handle overlap intentionally

Create nested or overlapping entities as separate annotations when the policy permits them; do not merge distinct concepts to avoid overlap.

4

4. Add entity structure

Complete required entity properties and create relations with the correct source, target, and direction.

5

5. Complete whole-item labels

Add classifications and Item Properties that describe the complete text, not a single mention.

6

6. Review and route

Scan every labeled span in context, inspect missed mentions and relation coverage, resolve validation, save, and use the current workflow action.

Quality review

Review focus
What to check

Span boundary

Apply the same token, punctuation, whitespace, and article policy to every mention.

Class meaning

Check the label definition against context, not surface wording alone.

Overlap

Preserve valid nested entities without creating accidental duplicates.

Relations

Check source, target, direction, and required relation coverage.

Document context

Review classification and Item Properties against the complete item.

Move from labels to governed data

Text exports should preserve character offsets, source text identity, nested spans, relations, properties, and document-level labels. If text normalization occurs downstream, maintain a traceable mapping back to the original offsets and version the ontology with the dataset.

Integrated Unitlab workflow connecting model assistance, annotation, review, and quality assurance

Use workflows to keep model output, human correction, review, and approval in one traceable operating path.

Next steps