AlvisAEReader
Synopsis
AlvisAEReader reads documents and annotations from an AlvisAE campaign.
Description
AlvisAEReader reads an AlvisAE server database and imports documents and annotation sets from an annotation campaign. The database connection and schema are specified with databasePropsFile . The campaignId parameter specifies the campaign identifier in the AlvisAE database (the AlvisAE client displays this identifier).
All AlvisAE annotations, including text-bound annotations, will be represented in AlvisNLP as relation tuples, in a relation named after the annotation type.
- For text-bound annotations, each fragment is represented in an annotation stored in the layer fragmentsLayer . The tuple references the fragments through its arguments; their role name is fragmentRolePrefix with the fragment order appended (starting at zero). Thus a single-fragment annotation will have a single argument with role
frag0
. The type of the annotation is stored in the feature typeFeature of the tuple and of each fragment. - A group tuple references its items through its arguments; their role name is itemRolePrefix with the item order appended (starting at zero).
- A relation tuple hareferences its arguments in a straightforward way.
The databasePropsFile is a Java Properties file that must contain the following keys:
db.type
: type of RDBMS (eg postgresql );db.server
: address of the RDBMS, either name or IP;db.port
: port number of the RDBMS;db.dbname
: name of the database that contains AlvisAE annotations;db.username
: RDBMS username;db.password
: RDBMS password;db.schema
: schema containing the desired annotations.
Snippet
<alvisaereader class="AlvisAEReader">
<campaignId>135</campaignId>
<databasePropsFile></databasePropsFile>
</alvisaereader>
Mandatory parameters
campaignId
Identifiers of the AlvisAE campaigns to import.
<campaignId>135</campaignId>
<campaignId>1,2,3</campaignId>
databasePropsFile
UNDOCUMENTED
Optional parameters
campaignIdFeature
Name of the document feature where to store the campaign id.
campaignNameFeature
Name of the document feature where to store the campaign name.
constantAnnotationFeatures
Constant features to add to each annotation created by this module.
constantDocumentFeatures
Constant features to add to each document created by this module.
constantRelationFeatures
Constant features to add to each relation created by this module.
constantSectionFeatures
Constant features to add to each section created by this module.
constantTupleFeatures
Constant features to add to each tuple created by this module.
docDescriptions
If set, AlvisAEReader imports only documents whose description is included in the value. If not set, then AlvisAEReader imports all documents.
docExternalIds
If set, AlvisAEReader imports only documents whose external id is included in the value. If not set, then AlvisAEReader imports all documents.
docIds
If set, AlvisAEReader imports only documents whose external id is included in the value. If not set, then AlvisAEReader imports all documents.
taskFeature
Name of the feature where to store the name task where the annotation belongs.
taskId
If set, AlvisAEReader imports only annotation sets of tasks whose id is included in the value. If this parameter and taskName are not set, AlvisAEReader imports annotations of all tasks.
taskIdFeature
Feature where to store the task identifier from which the annotation was imported.
taskName
If set, AlvisAEReader imports only annotation sets of tasks whose name is included in the value. If this parameter and taskId are not set, AlvisAEReader imports annotations of all tasks.
userFeature
Name of the feature where to store the name of the AlvisAE user that created the annotation.
userIdFeature
Feature where to store the user identifier from which the annotation was imported.
userIds
If set, AlvisAEReader imports only annotation sets created by an user whose id is included in the value. If this parameter and userNames are not set, AlvisAEReader imports annotations of all users.
userNames
If set, AlvisAEReader imports only annotation sets created by an user included in the value. If this parameter and userIds are not set, AlvisAEReader imports annotations of all users.
adjudicate
Either to automatically adjudicate identical source annotations, implies loadDependencies .
annotationIdFeature
Name of the feature where to store AlvisAE identifier of the annotation.
annotationSetIdFeature
Name of the feature where to store the identifier of the annotation set to which belongs the annotation.
createdFeature
Feature containing the annotation creation date.
descriptionFeature
Feature containing the document description.
externalIdFeature
Feature containing the document external id.
fragmentRolePrefix
For tuples that represent text-bound annotations, prefix of the role of fragment arguments.
fragmentTypeFeature
In annotations that represent text-bound fragments, name of the feature where to store the type of the annotation.
fragmentsLayer
Name of the layer where to store text-bound annotation fragments.
head
If true
, then AlvisAEReader imports the head annotation set. If false
, then AlvisAEReader imports the annotation set with version 1.
htmlLayer
Name of the layer where to store annotations that represent HTML tags.
htmlTagFeature
Feature where to store HTML tag name for annotations imported from the HTML annotation set.
itemRolePrefix
Prefix of the roles of arguments that represent group items.
kindFeature
Name of the relation feature containing the annotation kind (values are: text-bound , group , or relation ).
loadDependencies
Either to load dependencies if the annotation set task is a review.
loadGroups
Either to import group annotations.
loadRelations
Either to import relation annotations.
loadTextBound
Either to import text-bound annotations.
oldModel
Support database model for AlvisAE v0.3.
referentFeature
Name of the feature where to store back-reference of sources.
section
Name of the unique section created in each document.
sourceRolePrefix
Prefix for the roles for source annotations, will only be used if loadDependencies is true.
typeFeature
Feature that contains the type of the annotation.
unmatchedFeature
Feature where to store the AlvisAE identifiers of unmatched annotations (for review annotation sets).
Deprecated parameters
fragmentsLayerName
Deprecated alias for fragmentsLayer .
htmlLayerName
Deprecated alias for htmlLayer .
password
User password for JDBC connection. Deprecated and ignored : use databasePropsFile instead.
<password>***</password>
schema
PostgreSQL schema. Deprecated and ignored : use databasePropsFile instead.
<schema>psql_schema_name</schema>
sectionName
Deprecated alias for section .
url
PostgreSQL database URL. Deprecated and ignored : use databasePropsFile instead.
<url>postgresql://server.name[:port]/dbname</url>
username
PostgreSQL user name. Deprecated and ignored : use databasePropsFile instead.
<username>psql_user</username>