Repository navigation
API Documentation
Arthur Barrett edited this page Sep 11, 2019
·
3 revisions
No API key is required to use these endpoints.
Used to lemmatize a single word.
HTTP Request:
GET /api/lemmatize?word=друга
HTTP Response (200 OK):
{
"status": "success",
"data": {
"lemmas": [
{
"id": 95,
"label": "друг",
"stressed": "дру́г",
"translation": "friend; boyfriend",
"gender": "masc",
"pos": "noun",
"level": "1E",
"count": 1025.1,
"rank": 99,
"animacy": "animate",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
}
]
}
}Used to lemmatize text.
HTTP Request:
POST /api/lemmatize
{"text": "Все счастливые семьи похожи друг на друга"}
HTTP Response (200 OK):
{
"status": "success",
"data": {
"lemmas": {
"5": {
"id": 5,
"label": "на",
"stressed": "на",
"translation": "on; in; at",
"gender": "",
"pos": "prep",
"level": "1E",
"count": 16588.14,
"rank": 5,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"11": {
"id": 11,
"label": "весь",
"stressed": "ве́сь",
"translation": "all; whole; entire",
"gender": "",
"pos": "adjpron",
"level": "1E",
"count": 8604.72,
"rank": 12,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"95": {
"id": 95,
"label": "друг",
"stressed": "дру́г",
"translation": "friend; boyfriend",
"gender": "masc",
"pos": "noun",
"level": "1E",
"count": 1025.1,
"rank": 99,
"animacy": "animate",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"252": {
"id": 252,
"label": "похожий",
"stressed": "похо́ж; -а; -и (на кого́)",
"translation": "look like; resemble; be similar to",
"gender": "",
"pos": "adj",
"level": "1E",
"count": 328.64,
"rank": 278,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"349": {
"id": 349,
"label": "семья",
"stressed": "семья́",
"translation": "family",
"gender": "fem",
"pos": "noun",
"level": "1E",
"count": 239.52,
"rank": 408,
"animacy": "inanimate",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"616": {
"id": 616,
"label": "счастливый",
"stressed": "",
"translation": "happy; fortunate",
"gender": "",
"pos": "adj",
"level": "1E",
"count": 126.89,
"rank": 858,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"1814": {
"id": 1814,
"label": "все",
"stressed": "все",
"translation": "everyone; everybody",
"gender": "",
"pos": "pron",
"level": "1E",
"count": 0,
"rank": 90000,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"1815": {
"id": 1815,
"label": "всё",
"stressed": "всё",
"translation": "everything",
"gender": "",
"pos": "pron",
"level": "1E",
"count": 0,
"rank": 90000,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
}
},
"forms": {
"15": {
"id": 15,
"type": "preposition",
"label": "на",
"stressed": "на",
"frequency": null,
"lemma_id": 5
},
"93": {
"id": 93,
"type": "plNOMpl",
"label": "все",
"stressed": "все́",
"frequency": 5256.53,
"lemma_id": 11
},
"95": {
"id": 95,
"type": "plACCplIN",
"label": "все",
"stressed": "все́",
"frequency": 5256.53,
"lemma_id": 11
},
"107": {
"id": 107,
"type": "nNOMsg",
"label": "все",
"stressed": "всё",
"frequency": 5256.53,
"lemma_id": 11
},
"108": {
"id": 108,
"type": "nACCsg",
"label": "все",
"stressed": "всё",
"frequency": 5256.53,
"lemma_id": 11
},
"1258": {
"id": 1258,
"type": "NOMsg",
"label": "друг",
"stressed": "дру́г",
"frequency": 416.73,
"lemma_id": 95
},
"1259": {
"id": 1259,
"type": "ACCsg",
"label": "друга",
"stressed": "дру́га",
"frequency": 231.49,
"lemma_id": 95
},
"1260": {
"id": 1260,
"type": "GENsg",
"label": "друга",
"stressed": "дру́га",
"frequency": 231.49,
"lemma_id": 95
},
"4558": {
"id": 4558,
"type": "plshort",
"label": "похожи",
"stressed": "похо́жи",
"frequency": 27.37,
"lemma_id": 252
},
"7122": {
"id": 7122,
"type": "GENsg",
"label": "семьи",
"stressed": "семьи́",
"frequency": 71.13,
"lemma_id": 349
},
"7127": {
"id": 7127,
"type": "NOMpl",
"label": "семьи",
"stressed": "се́мьи",
"frequency": 71.13,
"lemma_id": 349
},
"7128": {
"id": 7128,
"type": "ACCpl",
"label": "семьи",
"stressed": "се́мьи",
"frequency": 71.13,
"lemma_id": 349
},
"13058": {
"id": 13058,
"type": "plNOMpl",
"label": "счастливые",
"stressed": "счастли́вые",
"frequency": 8.82,
"lemma_id": 616
},
"13060": {
"id": 13060,
"type": "plACCplIN",
"label": "счастливые",
"stressed": "счастли́вые",
"frequency": 8.82,
"lemma_id": 616
},
"37082": {
"id": 37082,
"type": "NOMpl",
"label": "все",
"stressed": "все́",
"frequency": 5256.53,
"lemma_id": 1814
},
"37088": {
"id": 37088,
"type": "NOMsg",
"label": "все",
"stressed": "всё",
"frequency": 5256.53,
"lemma_id": 1815
},
"37089": {
"id": 37089,
"type": "ACCsg",
"label": "все",
"stressed": "всё",
"frequency": 5256.53,
"lemma_id": 1815
}
},
"tokens": [
{
"token": "Все",
"index": 0,
"offset": 0,
"tokentype": "RUS",
"canonical": "все",
"form_ids": [
93,
95,
107,
108,
37082,
37088,
37089
],
"level": "1E"
},
{
"token": " ",
"index": 1,
"offset": 3,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "счастливые",
"index": 2,
"offset": 4,
"tokentype": "RUS",
"canonical": "счастливые",
"form_ids": [
13058,
13060
],
"level": "1E"
},
{
"token": " ",
"index": 3,
"offset": 14,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "семьи",
"index": 4,
"offset": 15,
"tokentype": "RUS",
"canonical": "семьи",
"form_ids": [
7122,
7127,
7128
],
"level": "1E"
},
{
"token": " ",
"index": 5,
"offset": 20,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "похожи",
"index": 6,
"offset": 21,
"tokentype": "RUS",
"canonical": "похожи",
"form_ids": [
4558
],
"level": "1E"
},
{
"token": " ",
"index": 7,
"offset": 27,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "друг",
"index": 8,
"offset": 28,
"tokentype": "RUS",
"canonical": "друг",
"form_ids": [
1258
],
"level": "1E"
},
{
"token": " ",
"index": 9,
"offset": 32,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "на",
"index": 10,
"offset": 33,
"tokentype": "RUS",
"canonical": "на",
"form_ids": [
15
],
"level": "1E"
},
{
"token": " ",
"index": 11,
"offset": 35,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "друга",
"index": 12,
"offset": 36,
"tokentype": "RUS",
"canonical": "друга",
"form_ids": [
1259,
1260
],
"level": "1E"
}
]
}
}Used to lemmatize a text and optionally render HTML showing the difficulty levels of words in the text.
HTTP Request:
POST /api/parsetext?html=y
{"text":"друг на друга"}
HTTP Response (200 OK):
{
"forms": {
"15": {
"id": 15,
"type": "preposition",
"label": "на",
"stressed": "на",
"frequency": null,
"lemma_id": 5
},
"1258": {
"id": 1258,
"type": "NOMsg",
"label": "друг",
"stressed": "дру́г",
"frequency": 416.73,
"lemma_id": 95
},
"1259": {
"id": 1259,
"type": "ACCsg",
"label": "друга",
"stressed": "дру́га",
"frequency": 231.49,
"lemma_id": 95
},
"1260": {
"id": 1260,
"type": "GENsg",
"label": "друга",
"stressed": "дру́га",
"frequency": 231.49,
"lemma_id": 95
}
},
"lemmas": {
"5": {
"id": 5,
"label": "на",
"stressed": "на",
"translation": "on; in; at",
"gender": "",
"pos": "prep",
"level": "1E",
"count": 16588.14,
"rank": 5,
"animacy": "",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
},
"95": {
"id": 95,
"label": "друг",
"stressed": "дру́г",
"translation": "friend; boyfriend",
"gender": "masc",
"pos": "noun",
"level": "1E",
"count": 1025.1,
"rank": 99,
"animacy": "animate",
"aspect": "",
"aspect_counterpart": [],
"transitivity": "",
"reverse": ""
}
},
"tokens": [
{
"token": "друг",
"index": 0,
"offset": 0,
"tokentype": "RUS",
"canonical": "друг",
"form_ids": [
1258
],
"level": "1E"
},
{
"token": " ",
"index": 1,
"offset": 4,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "на",
"index": 2,
"offset": 5,
"tokentype": "RUS",
"canonical": "на",
"form_ids": [
15
],
"level": "1E"
},
{
"token": " ",
"index": 3,
"offset": 7,
"tokentype": "SPACE",
"canonical": "",
"form_ids": [],
"level": ""
},
{
"token": "друга",
"index": 4,
"offset": 8,
"tokentype": "RUS",
"canonical": "друга",
"form_ids": [
1259,
1260
],
"level": "1E"
}
],
"html": "<pre class=\"words\"><span class=\"word parsed level1\" data-form-ids=\"1258\" data-level=\"1E\">друг</span> <span class=\"word parsed level1\" data-form-ids=\"15\" data-level=\"1E\">на</span> <span class=\"word parsed level1\" data-form-ids=\"1259,1260\" data-level=\"1E\">друга</span></pre>"
}