You may encounter a situation in which you have a reader for a corpus of
annotated documents, but you don't know what annotation types are
in them. You can explore the corpus from the command line using MATReport and create a task using the
--create_task option, or you can load the documents into the MAT
UI and infer a task from them. You can then augment this task with
other labels as you load more documents; edit the task in various
ways; and save it as XML for later installation with MATManagePluginDirs.
Be sure to read the limitations
before you use this capability.
At the bottom of the list to tasks in the "Open file..." dialog,
you'll see an element named "(inferred)". If you select this
element, you'll have the option of choosing between two languages
("Left to right" and "Right to left") and two workflows
("(annotate)", which will allow you to annotate, and
"(read-only)", which is the usual read-only configuration:
Select the input and document type as usual. If you select "XML
inline", note that you don't have to worry about unknown labels
being discarded; since the task is being inferred from the
document you select, all the labels will be known.
Press "Open" as usual. You may be warned that some labels are
being moved aside to block conflicts with the administrative
annotation names in MAT:
You'll next be presented with a simple task editor:
At this point, you may change the name of the task, choose to
alphabetize the labels in the legend and popup or not, and change
the content and the styling of the labels.
There are two types available: content and token. Only select
"token" if you're sure that the corresponding annotations really
are token annotations. Once you select "token", the styling for
the label will be fixed. To change the styling for a content
label, click on the label. You'll get a cascading popup which will
allow you to select among a variety of foreground/background color
combinations:
As the editor says, if you want to remove all styling from the
label (so it won't show up in the legend or the annotation popup,
or take up any room on the document's display), choose "None".
Once you press "Done", your document will appear, with the new
task. The new task will have a single undoable workflow named
"Hand annotation", which contains a single step named "annotate".
If you chose "(annotation)" in the "Open file..." dialog, you'll
be placed in this workflow.
You can interact with this document however you'd interact with
other documents. If you've made your document annotatable, you can
add, remove, modify and inspect annotations, view the annotations
in the annotation table, or use any of the other capabilities
available for annotation.
The next time you select "Open file...", your new task will
appear as the default in the task list, and the task list will
indicate which tasks are inferred (and, of course, you'll be able
to infer a new task, or select any other installed task, as
usual). If you load a document using an inferred task, and the
document has more labels than the task currently knows about, the
UI will add those labels to the task and present you, again, with
a task editor.
You have two opportunities to edit your task: by loading a new
document which has more labels than the task currently knows
about, and by pressing the "Edit task" button below the legend in
any document which shows the task.
If you load a new document which has more labels than the task
currently knows about, you'll get a new editor which allows you to
change the type of the new labels:
Note that the name of the task can no longer be changed, nor can
you change whether the task alphabetizes its labels. You can,
however, change the label styling for any content annotation,
whether or not it's just been added.
The legend for an inferred task has two buttons at the bottom,
"Edit task" and "Save task":
The "Edit task" button will bring up the task editor again. In
this editor, you'll be able to change the label styling of content
labels. The "Save task" button will convert the task to XML so you
can create a task directory, save the XML file in it, and install
the task using MATManagePluginDirs
for future reuse.
The task inference relies heavily on the capabilities of the
format reader. If the format reader can recognize attributes whose
value is something other than a string (e.g., an annotation), the
task will incorporate that information. However, it will not
recognize annotation-valued attributes if the format reader
doesn't do that.
The inferred task is known only to the UI. The MAT server
knows nothing about it, and it is not installed anywhere. If you
reload the UI, you lose the task. In order to make it persistent,
you must save the task, install it using MATManagePluginDirs, restart the
MAT server, and reload the UI. If you continue to edit it after
you save it, you must save it again to preserve your changes; if
you save, install, and restart the MAT server without reloading
the UI, you're still working with the inferred version of the
task, and you'll lose any changes you make when you finally
reload.
The inferred task has no automated processing associated with it.
In order to associate automatic processing with it, you must save
the task and edit the task XML.
You cannot create a workspace based on an inferred task (because
workspaces can only be created on the command line, and the task
must be installed).
You cannot use the inferred task for reconciliation or
comparison. It wouldn't be hard to enable this capability, but
there's no point, since there's no need for reconciliation or
comparison unless you have multiple conflicting annotated files,
which you're very unlikely to have for a task you don't know yet.
To use reconciliation or comparison with your task, save and
install it.
You cannot use the task editor to edit tasks other than inferred
tasks.
The task editor is currently quite limited. You can use it to:
You cannot use it to:
In order to make any of these changes, you must save the task,
edit the task XML, and install the task.