Newer
Older
In order to read annotations from a Tabular JSON document:
Decide which annotations should be imported into in the Inception project. The
more information that is extracted into the UIMA CAS file, the larger it will
be. Working with such files will be slow and cumbersome. Therefore, it makes
sense to only include annotations that you need to have displayed in your
Inception project.
Create the necessary layers for these annotations in the Inception GUI before
importing any documents. If the layers don't exist in Inception already, the
annotations won't be imported. Make sure the layers you create in Inception
are of the correct types:
| Tabular JSON | Inception |
| --- | --- |
| property, span | Span |
| relation | Relation |
| set, spanset | Chain |
Then Tabular JSON files can be converted to either XMI or JSON and imported
into Inception. For example, as follows:
writecas --pos --lemma -i metaphor=MRW mydocument.json > mydocument.xmi
In this case, the built-in POS and Lemma layers will be included, as well as
one custom layer. For this custom layer, the annotations under the "metaphor"
key will be imported into a custom layer with the internal name
"webanno.custom.MRW" (all custom layers in Inception use this namespace, which
is why it can be omitted in the CLI).
Note that for all built-in layers there is a dedicated option flag provided.
This is because Inception requires built-in layers to be handled differently
from custom layers. Custom layers, for their part, use a "key=value" mapping,
so that the data source and destination can be given. The interface is the
same for reading and for writing CAS data, e.g.:
readcas --pos --lemma -i MRW=metaphor mydocument.zip > mydocument.json