HTTP API to interact with shevchenko.js library.
To pull the Docker image, use the following command:
docker pull tooleks/shevchenko
To start the Docker container, use the following command:
docker run --name shevchenko -p 3000:3000 -d tooleks/shevchenko
To verify the installation, run the following command:
wget -qO- http://localhost:3000/ 2>&1
The example output:
{"name":"shevchenko","version":"X.X.X"}
http://localhost:3000/nominative
http://localhost:3000/genitive
http://localhost:3000/dative
http://localhost:3000/accusative
http://localhost:3000/ablative
http://localhost:3000/locative
http://localhost:3000/vocative
http://localhost:3000/gender
This example shows how to use the API to decline Ukrainian anthroponyms.
POST /vocative HTTP/1.1
Host: localhost:3000
Content-Type: application/json
{
"gender": "masculine",
"givenName": "Тарас",
"patronymicName": "Григорович",
"familyName": "Шевченко"
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"givenName": "Тарасе",
"patronymicName": "Григоровичу",
"familyName": "Шевченку"
}
This example shows how to use the API to automatically detect the grammatical gender of a Ukrainian anthroponym.
POST /vocative HTTP/1.1
Host: localhost:3000
Content-Type: application/json
{
"givenName": "Лариса",
"patronymicName": "Петрівна",
"familyName": "Косач-Квітка"
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"givenName": "Ларисо",
"patronymicName": "Петрівно",
"familyName": "Косач-Квітко"
}
Content type
Image
Digest
sha256:08c94b564…
Size
109.1 MB
Last updated
7 months ago
docker pull tooleks/shevchenko