Thrift module: curator

ModuleServicesData typesConstants
curatorCurator
MultiRecord
Record

Data structures

Struct: Record

FieldTypeDescriptionRequirednessDefault value
identifierstringhow to identify this record. required
rawTextstringThe raw text string. required
labelViewsmap<string, base.Labeling>Label views. Contains all the Labelings. required
clusterViewsmap<string, base.Clustering>Cluster views. Contains all the Clusterings. required
parseViewsmap<string, base.Forest>Parse views. Contains all the Forests. required
viewsmap<string, base.View>General views. Contains all the Views. required
whitespacedboolWas this Record created using a ws* method. required

Record's are the objects that hold all annotations on a text.

identifier - a unique identifier for this record.
rawText - the raw text associated with this record.
labelViews - Label views. Contains all the Labelings for this record.
clusterViews - Cluster views. Contains all the Clusterings for this record.
parseViews - Parse views. Contains all the Forests for this record.
views - Label views. Contains all the Views for this record.
whitespaced - Was this Record created using a ws* method?


Struct: MultiRecord

FieldTypeDescriptionRequirednessDefault value
identifierstringrequired
recordslist<string>required
labelViewsmap<string, base.Labeling>required
clusterViewsmap<string, base.Clustering>required
parseViewsmap<string, base.Forest>required
viewsmap<string, base.View>required


Services

Service: Curator

extends base.BaseService

Function: Curator.describeAnnotations

map<string, string> describeAnnotations()
Returns a map of view_names to annotation server names. Useful for inspecting the annotations available via the curator.

Function: Curator.isCacheAvailable

bool isCacheAvailable()
Is caching enabled on this server?

Function: Curator.provide

Record provide(string view_name,
               string text,
               bool forceUpdate)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Provide annotation of view_name for a given text. forceUpdate forces the annotation to be reprocessed even if it is available in the cache.

Function: Curator.wsprovide

Record wsprovide(string view_name,
                 list<string> sentences,
                 bool forceUpdate)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Provide annotation of view_name for a given list of strings. Each string will be tokenized on whitespace and each string should represent one sentence. forceUpdate forces the annotation to be reprocessed even if it is available in the cache.

Function: Curator.getRecord

Record getRecord(string text)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Returns the Record for a given text.

Function: Curator.wsgetRecord

Record wsgetRecord(list<string> sentences)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Returns the Record for a given list of strings. Each string will be tokenized on whitespace and each string should represent one sentence.

Function: Curator.getRecordById

Record getRecordById(string identifier)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Returns the Record associated with a given identifier.

Function: Curator.storeRecord

void storeRecord(Record record)
    throws base.ServiceSecurityException
Store the given Record. Usually disabled.

Function: Curator.getMultiRecord

MultiRecord getMultiRecord(list<string> texts)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Returns a MultiRecord for a given list of texts.

Function: Curator.provideMulti

MultiRecord provideMulti(string view_name,
                         list<string> texts,
                         bool forceUpdate)
    throws base.ServiceUnavailableException, base.AnnotationFailedException
Provides the view_name for multiple texts in a MultiRecord.

Function: Curator.storeMultiRecord

void storeMultiRecord(MultiRecord record)
    throws base.ServiceSecurityException
Store the given MultiRecord. Usually disabled.