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
- Navigate to a collection
- Open a document
- Click "Start Annotating" or "Annotate"
- 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
- Click and drag to select text in the document
- The selection will be highlighted
- An entity type picker popup will appear near the selection
- Click on an entity type to create the annotation
- The annotation will be saved and highlighted with the entity type's color
Using Keyboard Shortcuts
For faster annotation, use keyboard shortcuts:
- Select text with your mouse
- Press the hotkey assigned to the entity type (shown in the left sidebar)
- 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
- Hold Ctrl (Windows/Linux) or Cmd (Mac)
- Select the first text span
- While holding the modifier key, select additional text spans
- All selected spans will be highlighted
- Choose an entity type from the picker
- 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
- Make your changes in the edit panel
- Click "Save" to apply changes
- The annotation is updated in the database
- The
updatedByandupdatedAtfields 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
- Select the annotation you want to delete
- Click "Delete" in the edit panel, or
- Click the delete icon in the annotation list
- Confirm deletion in the dialog (if confirmation is enabled)
Soft Delete
Annotations are soft-deleted by default:
- The
isDeletedflag 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
| Shortcut | Action |
|---|---|
| Ctrl+Z / Cmd+Z | Undo last action |
| Ctrl+Shift+Z / Cmd+Shift+Z | Redo last undone action |
| Esc | Cancel 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.