concrete.services.ttypes module

class concrete.services.ttypes.AnnotationTaskType

Bases: object

Annotation Tasks Types

NER = 2
TRANSLATION = 1
class concrete.services.ttypes.AnnotationUnitIdentifier(communicationId=None, sentenceId=None)

Bases: object

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

- communicationId

Communication identifier for loading data

- sentenceId

Sentence identifer if annotating sentences

read(iprot)
thrift_spec = (None, (1, 11, 'communicationId', 'UTF8', None), (2, 12, 'sentenceId', (<class 'concrete.uuid.ttypes.UUID'>, (None, (1, 11, 'uuidString', 'UTF8', None))), None))
validate()
write(oprot)
class concrete.services.ttypes.AnnotationUnitType

Bases: object

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

COMMUNICATION = 1
SENTENCE = 2
class concrete.services.ttypes.AsyncContactInfo(host=None, port=None)

Bases: object

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.

- host
- port
read(iprot)
thrift_spec = (None, (1, 11, 'host', 'UTF8', None), (2, 8, 'port', None, None))
validate()
write(oprot)
exception concrete.services.ttypes.NotImplementedException(message=None, serEx=None)

Bases: thrift.Thrift.TException

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

- message

The explanation (why the exception occurred)

- serEx

The serialized exception

read(iprot)
thrift_spec = (None, (1, 11, 'message', 'UTF8', None), (2, 11, 'serEx', 'BINARY', None))
validate()
write(oprot)
class concrete.services.ttypes.ServiceInfo(name=None, version=None, description=None)

Bases: object

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

- name

Name of the service

- version

Version string of the service.

It is preferred that the services implement semantic versioning: http://semver.org/ with version strings like x.y.z

  • description: Description of the service
read(iprot)
thrift_spec = (None, (1, 11, 'name', 'UTF8', None), (2, 11, 'version', 'UTF8', None), (3, 11, 'description', 'UTF8', None))
validate()
write(oprot)
exception concrete.services.ttypes.ServicesException(message=None, serEx=None)

Bases: thrift.Thrift.TException

An exception to be used with Concrete services.

- message

The explanation (why the exception occurred)

- serEx

The serialized exception

read(iprot)
thrift_spec = (None, (1, 11, 'message', 'UTF8', None), (2, 11, 'serEx', 'BINARY', None))
validate()
write(oprot)