Core Annotation Features

Creating and managing annotations in documents

Annotation Workspace

The annotation workspace provides a clean, focused interface for creating and managing annotations.

Workspace Layout

The workspace is divided into several panels:

  • Center Panel: Document text with annotation highlights
  • Left Sidebar: Entity types list with colors and hotkeys
  • Right Panel: Annotation list showing all annotations in the document
  • Top Toolbar: Annotation controls, undo/redo, statistics

Opening the Workspace

  1. Navigate to a collection
  2. Open a document
  3. Click "Start Annotating" or "Annotate"
  4. Select an annotation configuration if prompted

The workspace will load with the document text and any existing annotations.

Creating Entity Annotations

Entity annotations mark named entities in text. You can create them by selecting text and choosing an entity type.

Basic Annotation Creation

  1. Click and drag to select text in the document
  2. The selection will be highlighted
  3. An entity type picker popup will appear near the selection
  4. Click on an entity type to create the annotation
  5. The annotation will be saved and highlighted with the entity type's color

Using Keyboard Shortcuts

For faster annotation, use keyboard shortcuts:

  1. Select text with your mouse
  2. Press the hotkey assigned to the entity type (shown in the left sidebar)
  3. The annotation is created immediately without opening the picker

Hotkeys are configurable in the annotation configuration (1-9, A-Z).

Annotation Display

Once created, annotations are:

  • Highlighted in the document text with the entity type's color
  • Listed in the right panel annotation list
  • Assigned a unique annotation ID
  • Linked to the annotation set and configuration

Multi-Span Annotations

Some entities span multiple discontinuous text segments. The system supports multi-span annotations for these cases.

Creating Multi-Span Annotations

  1. Hold Ctrl (Windows/Linux) or Cmd (Mac)
  2. Select the first text span
  3. While holding the modifier key, select additional text spans
  4. All selected spans will be highlighted
  5. Choose an entity type from the picker
  6. All spans are grouped under a single annotation

Example: "New York ... City" can be annotated as a single LOCATION entity with two spans.

Span Order

Spans are automatically sorted by their start position in the document:

  • The order is preserved when displaying the annotation
  • When editing, you can see all spans in order
  • The annotation text shows spans joined with " ... "

Editing Multi-Span Annotations

When editing a multi-span annotation, you can:

  • Add new spans
  • Remove individual spans
  • Adjust span boundaries
  • Change the entity type

Editing Annotations

You can edit annotations to fix mistakes, change entity types, or adjust span boundaries.

Selecting an Annotation

To edit an annotation:

  • Click on the highlighted text in the document, or
  • Click on the annotation in the right panel annotation list

The annotation will be selected and the edit panel will open.

Edit Panel

The edit panel allows you to:

  • Change Entity Type: Select a different entity type from the dropdown
  • Adjust Spans: Modify start and end positions for each span
  • Add Spans: Click "Add Span" to add another text segment
  • Remove Spans: Click the delete icon next to a span

Saving Changes

  1. Make your changes in the edit panel
  2. Click "Save" to apply changes
  3. The annotation is updated in the database
  4. The updatedBy and updatedAt fields are automatically updated

Canceling Changes

Click "Cancel" or close the edit panel to discard changes. The annotation will revert to its previous state.

Deleting Annotations

You can delete annotations that are incorrect or no longer needed.

How to Delete

  1. Select the annotation you want to delete
  2. Click "Delete" in the edit panel, or
  3. Click the delete icon in the annotation list
  4. Confirm deletion in the dialog (if confirmation is enabled)

Soft Delete

Annotations are soft-deleted by default:

  • The isDeleted flag is set to true
  • The annotation disappears from the view
  • It can be restored by admins if needed
  • Related relations and events are handled appropriately

Confirmation Dialog

Depending on your settings, you may see a confirmation dialog before deletion:

  • This helps prevent accidental deletions
  • You can disable confirmations in settings if preferred

Keyboard Shortcuts

Keyboard shortcuts help you annotate faster and more efficiently.

Entity Type Hotkeys

Each entity type can have a keyboard shortcut (hotkey):

  • Hotkeys are shown in the left sidebar next to each entity type
  • After selecting text, press the hotkey to create an annotation immediately
  • Hotkeys can be numbers (1-9) or letters (A-Z)
  • Configure hotkeys in the annotation configuration

General Shortcuts

ShortcutAction
Ctrl+Z / Cmd+ZUndo last action
Ctrl+Shift+Z / Cmd+Shift+ZRedo last undone action
EscCancel current selection or close panels
?Show keyboard shortcuts help (coming soon)

Multi-Span Selection

To create multi-span annotations:

  • Hold Ctrl (Windows/Linux) or Cmd (Mac)
  • Select multiple text spans
  • Release the modifier key and choose an entity type

Undo & Redo

The system supports undo and redo for annotation actions, allowing you to easily fix mistakes.

Undo

To undo the last action:

  • Press Ctrl+Z (Windows/Linux) or Cmd+Z (Mac)
  • Or click the "Undo" button in the toolbar
  • The last annotation action (create, update, delete) will be reversed

Redo

To redo an undone action:

  • Press Ctrl+Shift+Z (Windows/Linux) or Cmd+Shift+Z (Mac)
  • Or click the "Redo" button in the toolbar
  • The previously undone action will be reapplied

Action History

The system maintains an action history stack:

  • History is limited to the current session (e.g., last 50 actions)
  • Actions include: create annotation, update annotation, delete annotation
  • History is cleared when you navigate away from the document

Annotation Statistics

Real-time statistics help you track your annotation progress and see what types of annotations you've created.

Statistics Display

The statistics panel shows:

  • Entity Count by Type: Number of annotations for each entity type
  • Total Annotations: Total number of entity annotations created
  • Relation Count: Number of relation annotations (when implemented)
  • Progress Bar: If a task is assigned, shows completion progress

Real-Time Updates

Statistics update automatically as you:

  • Create new annotations
  • Update existing annotations
  • Delete annotations

No page refresh is needed - statistics update in real-time.