Thrift module: learn

Module Services Data types Constants
learn ActiveLearnerServerService
ActiveLearnerClientService
Annotation
AnnotationTask

Data structures

Struct: AnnotationTask

Key Field Type Description Requiredness Default value
1 type services.AnnotationTaskType Type of annotation task required
2 language string Language of the data for the task optional
3 unitType services.AnnotationUnitType Entire communication or individual sentences required
4 units list< services.AnnotationUnitIdentifier > Identifiers for each annotation unit required

Annotation task including information for pulling data.

Struct: Annotation

Key Field Type Description Requiredness Default value
1 id services.AnnotationUnitIdentifier Identifier of the part of the communication being annotated. required
2 communication communication.Communication Communication with the annotation stored in it. The location of the annotation depends on the annotation unit identifier required

Annotation on a communication.


Services

Service: ActiveLearnerServerService

The active learning server is responsible for sorting a list of communications.
Users annotate communications based on the sort.

Active learning is an asynchronous process.
It is started by the client calling start().
At arbitrary times, the client can call addAnnotations().
When the server is done with a sort of the data, it calls submitSort() on the client.
The server can perform additional sorts until stop() is called.

The server must be preconfigured with the details of the data source to pull communications.

Function: ActiveLearnerServerService.start

bool start(uuid.UUID sessionId,
           AnnotationTask task,
           services.AsyncContactInfo contact)
Start an active learning session on these communications

Function: ActiveLearnerServerService.stop

void stop(uuid.UUID sessionId)
Stop the learning session

Function: ActiveLearnerServerService.addAnnotations

void addAnnotations(uuid.UUID sessionId,
                    list<Annotation> annotations)
Add annotations from the user to the learning process

Service: ActiveLearnerClientService

The active learner client implements a method to accept new sorts of the annotation units

Function: ActiveLearnerClientService.submitSort

void submitSort(uuid.UUID sessionId,
                list<services.AnnotationUnitIdentifier> unitIds)
Submit a new sort of communications to the broker