AlvisNLP

corpus processing engine

BioNLPSTReader

Synopsis

Reads documents and annotations in the BioNLP-ST 2013 a1/a2 format .

Description

BioNLPSTReader reads text files in the directory specified by textDir as documents, then imports annotations in the corresponding files in the directories specified by a1Dir and a2Dir .

Snippet

<bionlpstreader class="BioNLPSTReader">
    <textDir></textDir>
</bionlpstreader>

Mandatory parameters

textDir

Mandatory

Path to the directory containing .txt files.

Optional parameters

a1Dir

Optional

Path to the directory containing .a1 files. If this parameter is not set, then BioNLPSTReader does not read a1 files. This directory must contain one .a1 file for each .txt file found in textDir .

> Examples

<a1Dir>/path/to/a1/</a1Dir>

a2Dir

Optional

Path to the directory containing .a2 files. If this parameter is not set, then BioNLPSTReader does not read a2 files. This directory must contain one .a2 file for each .txt file found in textDir .

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.

schema

Optional

Annotation schema against which the annotations are checked. BioNLPSTReader aborts if the annotations do not check. If not set, the annotations are not checked.

> Examples

<schema>
			<text-bound type="Title"/>
			<text-bound type="Paragraph"/>
			<text-bound type="Microorganism"/>
			<text-bound type="Habitat"/>
			<text-bound type="Phenotype"/>
			<text-bound type="Geographical"/>
			<relation type="Lives_In">
				<roles>Microorganism,Location</roles>
				<mandatory-arguments>Microorganism,Location</mandatory-arguments>
				<argument-types role="Microorganism">Microorganism</argument-types>
				<argument-types role="Location">Habitat,Geographical,Microorganism</argument-types>
			</relation>
			<relation type="Exhibits">
				<roles>Microorganism,Property</roles>
				<mandatory-arguments>Microorganism,Property</mandatory-arguments>
				<argument-types role="Microorganism">Microorganism</argument-types>
				<argument-types role="Property">Phenotype </argument-types>
			</relation>
        </schema>

charset

Default value: `UTF-8`
Type: String

Character encoding of all imported files.

> Examples

<charset>UTF-8</charset>

equivalenceItemPrefix

Default value: `item`
Type: String

Prefix of the role of arguments that represent group elements.

> Examples

<equivalenceItemPrefix>item</equivalenceItemPrefix>

equivalenceRelation

Default value: `equiv`
Type: String

Name of the relation whose tuples represent equivalences.

> Examples

<equivalenceRelation>equiv</equivalenceRelation>

eventKind

Default value: `event`
Type: String

Kind value for event annotations.

> Examples

<eventKind>event</eventKind>

fragmentCountFeature

Default value: `fragments`
Type: String

Feature where to store the number of merged fragments. This feature is only set if textBoundAsAnnotations is true .

> Examples

<fragmentCountFeature>fragments</fragmentCountFeature>

idFeature

Default value: `id`
Type: String

Feature where to store the annotation identifier.

> Examples

<idFeature>id</idFeature>

kindFeature

Default value: `kind`
Type: String

Feature of relations contatining the annotation kind.

kind<h3 id="relationKind" class="param">relationKind</h3>

Default value: `relation`
Type: String

Kind value for relation annotations.

relation<h3 id="section" class="param">section</h3>

Default value: `text`
Type: String

Name of the unique section contating all the text.

> Examples

<section>text</section>

textBoundAsAnnotations

Default value: `false`
Type: Boolean

If true , BioNLPSTReader imports text-bound annotations as annotations instead of tuples. Multiple fragments text-bound annotations are merged.

> Examples

<textBoundAsAnnotations/>

textBoundFragmentRolePrefix

Default value: `frag`
Type: String

Prefix of the role of arguments that represent text-bound fragments.

> Examples

<textBoundFragmentRolePrefix>frag</textBoundFragmentRolePrefix>

textKind

Default value: `text`
Type: String

Kind value for text annotations.

> Examples

<textKind>text-bound</textKind>

triggerRole

Default value: `trigger`
Type: String

Role of the argument that represent an event trigger.

typeFeature

Default value: `type`
Type: String

Feature where to store the type of the annotation.

> Examples

<typeFeature>type</typeFeature>

Deprecated parameters

equivalenceRelationName

Deprecated
Type: String

Deprecated alias for equivalenceRelation .

fragmentCountFeatureName

Deprecated
Type: String

Deprecated alias for fragmentCountFeature .

idFeatureName

Deprecated
Type: String

Deprecated alias for idFeature .

kindFeatureName

Deprecated
Type: String

Deprecated alias for kindFeature .

sectionName

Deprecated
Type: String

Deprecated alias for section .

typeFeatureName

Deprecated
Type: String

Deprecated alias for typeFeature .