PubAnnotationReader
Synopsis
Read stream in PubAnnotation JSON format .
This module is experimental.
Description
PubAnnotationReader reads the contents of source in PubAnnotation JSON format . The following conversions are observed:
- single-span denotations are converted as annotations in a layer named as the denotation object;
- multi-span denotations are converted as tuples, in a relation named as the denotation object, with one argument for each fragment with roles
fragN
; - relations are converted as tuples, in a relation named as the relation predicate, with two arguments;
- modifications are converted as additional features on the element representing the modification object.
Snippet
<pubannotationreader class="PubAnnotationReader">
<source></source>
</pubannotationreader>
Mandatory parameters
source
Mandatory
Type: SourceStream
Source stream in PubAnnotation JSON format.
Optional parameters
constantAnnotationFeatures
Optional
Type: Mapping
Constant features to add to each annotation created by this module.
constantDocumentFeatures
Optional
Type: Mapping
Constant features to add to each document created by this module.
constantRelationFeatures
Optional
Type: Mapping
Constant features to add to each relation created by this module.
constantSectionFeatures
Optional
Type: Mapping
Constant features to add to each section created by this module.
constantTupleFeatures
Optional
Type: Mapping
Constant features to add to each tuple created by this module.