This section serves as a reference to developers who would like to use Cesilko translation API in their web applications. The Cesilko API is available via REST. The Cesilko REST API can be accessed directly or via any other web programming tools that support standard HTTP request methods and JSON for output handling. The following sections explain the invocation of Cesilko REST API with examples.
# | Service Request | Description | HTTP Method |
---|---|---|---|
1 | translate | translates text in Czech (CZ) to Slovak (SK) | GET/POST |
2 | version | returns the version number of Cesilko system | GET/POST |
The translate is the main operation/service offered by the REST API. This service translates the given text in Czech language into Slovak. The possible parameters for the translate service are described in the following table.
# | Parameter | Mandatory | Data type | Description |
---|---|---|---|---|
1 | data | yes | string | Czech input text in UTF-8 |
https://lindat.mff.cuni.cz/services/rest/cesilko/translate?data={Czech text} https://lindat.mff.cuni.cz/services/rest/cesilko/translate?data=Já mám hlad
curl -X POST --data-urlencode "data=Já mám hlad" https://lindat.mff.cuni.cz/services/rest/cesilko/translate
{ "input": "'J\u00e1 m\u00e1m hlad'", "result": " 'Ja m\u00e1m hlad' \n\n" }
This service returns the version number of the Cesilko system
https://lindat.mff.cuni.cz/services/rest/cesilko/version
curl https://lindat.mff.cuni.cz/services/rest/cesilko/version
{ "version": "v1.0", "author": [ "Jan Haji\u010d", "Vladislav Kubo\u0148", "Petr Homola" ] }