Thrift module: services

Module Services Data types Constants
services Service
AnnotationTaskType
AnnotationUnitIdentifier
AnnotationUnitType
AsyncContactInfo
NotImplementedException
ServiceInfo
ServicesException

Enumerations

Enumeration: AnnotationTaskType

Annotation Tasks Types


TRANSLATION 1
NER 2
TOPICID 3

Enumeration: AnnotationUnitType

An annotation unit is the part of the communication to be annotated.


COMMUNICATION 1
SENTENCE 2

Data structures

Exception: ServicesException

Key Field Type Description Requiredness Default value
1 message string The explanation (why the exception occurred) required
2 serEx binary The serialized exception optional

An exception to be used with Concrete services.

Exception: NotImplementedException

Key Field Type Description Requiredness Default value
1 message string The explanation (why the exception occurred) required
2 serEx binary The serialized exception optional

An exception to be used when an invoked method has
not been implemented by the service.

Struct: AsyncContactInfo

Key Field Type Description Requiredness Default value
1 host string required
2 port i32 required

Contact information for the asynchronous communications.
When a client contacts a server for a job that takes a significant amount of time,
it is often best to implement this asynchronously.
We do this by having the client stand up a server to accept the results and
passing that information to the original server.
The server may want to create a new thrift client on every request or maintain
a pool of clients for reuse.

Struct: AnnotationUnitIdentifier

Key Field Type Description Requiredness Default value
1 communicationId string Communication identifier for loading data required
2 sentenceId uuid.UUID Sentence identifer if annotating sentences optional

An annotation unit is the part of the communication to be annotated.
It can be the entire communication or a particular sentence in the communication.
If the sentenceID is null, the unit is the entire communication

Struct: ServiceInfo

Key Field Type Description Requiredness Default value
1 name string Name of the service required
2 version string Version string of the service. It is preferred that the services implement semantic versioning: http://semver.org/ with version strings like x.y.z required
3 description string Description of the service optional

Each service is described by this info struct.
It is for human consumption and for records of versions in deployments.


Services

Service: Service

Base service that all other services should inherit from

Function: Service.about

ServiceInfo about()
Get information about the service

Function: Service.alive

bool alive()
Is the service alive?