Span annotation

The Web UI that comes with MAT is a rich, logging-enabled tool for viewing, processing and annotating your documents. We describe how to use it here.

We assume that you've started the Web server and loaded the UI.

Note: while the UI attempts to minimize the redraw required for the annotation panes, there are circumstances where large numbers of annotations (e.g., thousands, including tokens) will slow down the UI visibly in specific circumstances: initial document load; displaying the result of automated steps performed in the backend; and resizing of the window width.

Annotating

Here's view of the UI, after you've loaded a document as described here, and two steps (zone and tokenize) have been applied by pressing the forward button:


The following changes are visible:

Whenever the hand annotation status line reads "Hand annotation available (swipe or left-click)", you may edit the content annotations for the current step in your document.

Adding an annotation

To add an annotation, either swipe or left-click in the document text where there are no content annotations. Swiping selects a range of tokens; left-clicking selects a single token. In this example, we've swiped:

[add annotation]

The annotation menu pops up automatically. In this example, where the text is previously unannotated, the menu contains, for each content annotation, the option to add that annotation. The menu items are styled with the same CSS that the resulting annotation will be styled with. Optionally, the menu may present a keyboard accelerator; here, if you press "O" when the menu is visible, it's identical to selecting "Add ORGANIZATION" from the annotation menu. The result is shown here:

[added annotation]

If you place your mouse over the annotation you've added, the tagging information line immediately below the text changes to show the name of the annotation:

[hover]

And now that you've added an annotation, your annotation popup will provide the option of repeating the last annotation. If, say, you move on to annotate "Pakistan" as a location in the third line, and then make another selection, you'll see "Repeat LOCATION" as an option in your annotation popup:

[repeat annotation]

Note that this option always has the keyboard accelerator "=". So in this case, you can mark this next occurrence of "Pakistan" as a location either by pressing the "L" or "=" keys, or by selecting "Add LOCATION" or "Repeat LOCATION" from the annotation popup menu.

Removing an annotation

To remove an annotation, left-click the annotation:

[add or modify]

From the menu, select "Delete annotation", or press the "-" key. The annotation will be removed. If you'd rather replace the annotation with a different one, simply select that option with the mouse or via the keyboard accelerator; the current annotation will be removed and the new one added.

Adding an overlapping annotation

In some cases, you'll want to add annotations which overlap each other. To do this, swipe the region of text you wish to add an annotation to. Do not left-click on an existing annotation without swiping; the UI will interpret this as a request to perform an operation on the annotation (i.e., autotag, delete, or replace).

[add or modify annotation]

If you select "Add LOCATION" in this case, you'll now see a "stacked" display of the overlapping annotations:

[stacked annotations]

The stacking order is currently arbitrary. You may discover that when you add an annotation, it might become the annotation behind the text, and the new annotation may be moved to above the text.

For more about overlapping annotations, see here.

Modifying an annotation extent

As you can see, when you swipe over an existing annotation, you have the option of modifying the extent of that annotation. If the region contains multiple overlapping annotations, one of two things will happen. In the first case, if each "layer" has no more than one annotation on it, the popup menu will present you with the option of modifying the extent of the annotation on a particular layer:

[stacked modify]

If any layer has more than one annotation under the swipe, instead of having a separate entry for each layer, there will be a single option "Modify extent...", and when you choose it, you'll be presented with an opportunity to choose the annotation which you intend to modify. The extent of your swipe will be shown by a dotted-line box; any annotation which overlaps with this box is eligible to be selected to be modified:

[stacked modify multiple]

You may cancel the modification, either by pressing "Cancel" or closing the popup using the "x" in the upper right corner. If you select an annotation outside the boundary box, you'll be presented with an error and the modification will be cancelled.

Autotagging

You'll notice, above, that when you select an annotation, the popup menu contains not just the options to replace or remove, but also to "Autotag matches". For details about this capability, see the section on autotagging.

Annotation tables

If you want to see a list of all the annotations you've created, you can enable annotation tables:

[Annotation tables]

You can learn more about annotation tables here.

Annotation review and overlapping annotations

When hand annotation is available, overlapping annotations are always stacked, as shown above. It's possible to "collapse" this stack when hand annotation is not available, by changing the alwaysShowStackedAnnotations UI setting. When annotations are not stacked, they're layered on top of one another. This view is more compact, but less clear; but in addition to this UI setting, there are situations where all the annotations in a given document must be layered in a single line, such as in the document comparison and document reconciliation views.

When you're in these views, there are some other resources that you can rely on to understand what's in your document. First, when you hover your mouse over overlapping annotations in these views, you'll see, in the tagging information line, all the annotations at that position, and the frontmost annotation (the one you can see) will be in boldface. In addition, there are additional annotation menu options that allow you to manipulate these layered annotations. When you click (not swipe) on a position that has a visible annotation which is partially obscured elsewhere, you'll see a "Bring to front" menu action which will make that annotation frontmost along its entire extent. And when there are annotations which are not visible, there will be a "Bring <label> to front" menu action for each of those annotations.