Teanga service Module
RESTService
Bases: Service
An external service implemented in REST
Source code in teanga/service.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
__init__(endpoint)
Creates a new REST service reading from the given endpoint.
Source code in teanga/service.py
33 34 35 36 37 38 |
|
execute(input)
Executes this service on a document.
Source code in teanga/service.py
54 55 56 57 |
|
produces()
Returns a dictionary of the layers produced by this service.
Source code in teanga/service.py
47 48 49 50 51 52 |
|
requires()
Returns a dictionary of the layers required by this service.
Source code in teanga/service.py
40 41 42 43 44 45 |
|
Service
Bases: ABC
A service that can do some work on documents in a Teanga corpus.
Source code in teanga/service.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
execute(input)
abstractmethod
Executes this service on a document.
Source code in teanga/service.py
25 26 27 28 |
|
produces()
abstractmethod
Returns a dictionary of the layers produced by this service.
Source code in teanga/service.py
20 21 22 23 |
|
requires()
abstractmethod
Returns a dictionary of the layers required by this service.
Source code in teanga/service.py
15 16 17 18 |
|
setup()
Sets up this service, including downloading any models.
Source code in teanga/service.py
11 12 13 |
|
rest_service(service, kwargs)
Start a service as a REST service.
Source code in teanga/service.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|