Ru En

The Linguistic API (Cloud Service) for Chatbot Developers and Linguists

EnduranceRobots.com together with ParaPhraser.ru offer a universal API linguistic service open for everybody:

  1. Chatbot developers;
  2. Web-masters;
  3. Advertisers;
  4. Copywriters;
  5. Linguists.

The Linguistic API (Cloud Service) for Chatbot Developers and Linguists

The Linguistic API (Cloud Service) for Chatbot Developers and Linguists

The API Functions
A Similar Words (Phrases) Vector
Status: Active
Returns a list of words or phrases similar to the original word or phrase on the basis of the vector semantic model.

Description

The function accepts a phrase or a word for the input, performs its morphological analysis, removes ambiguity at the level of the parts of speech, and returns a list of phrases or words that are semantically close to the original phrase or word, based on the Word2Vec technology. The initial form and part of speech of the original word in the Universal POS tags format are also returned (in the case of phrases, this information is returned for each word inside the original phrase).
If an input word is ambiguous, the answer is given for each possible part of speech of that word separately. In addition, the output words are in the same form as the words in the original query.
If an input word is not found in the vector model, the function returns only the initial form and part of speech. Some auxiliary parts of speech (articles, auxiliary verbs), as well as punctuation marks and other symbols are treated in the similar way — the function returns only the initial form and part of speech.
The function is basic for the given API.

Parameters





























Parameter



Description



Query



The
search word or phrase (a line, not more than 90 characters)



Top



The
number of returned words and phrases of similar import not more
than 30.



Lang



Language
(«ru» or «en»)



Format



The
entry format (must take the meaning «json»)



Token



A
unique user’s key


An Example of a Query (RU)

http://www.paraphraser.ru/api?c=vector&query=ищите женщину&top=3&lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"response": {
"1": {
"original": "ищите женщину",
"vector": [
"отыскивайте девушку",
"выискивайте девушку",
"отыскивайте мужчину",
],
"lemma": "искать женщина",
"pos": "VERB NOUN"
}
},
"msg": "OK"
}

An Example of a Query (EN)

http://www.paraphraser.ru/api?c=vector&query=rainy day&top=3&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"1": {
"original": "rainy day",
"vector": [
"muggy month",
"windless month",
"windless week",
],
"lemma": "rainy day",
"pos": "ADJ NOUN"
}
},
"msg": "OK"
}

A Note

The set of input parameters of this function can be expanded to obtain semantic similarity indexes and word forms.

Semantic Similarity Indexes

Status: Active
Returns the index of semantic similarity between the output and the original word or phrase for each phrase or word in the output vector of close words.

Description

The function expands the vector of similar words (phrases), providing it with the semantic similarity indexes (relative to the original word or phrase). The index values can be from 0 to 1.

Parameters

In addition to the basic parameters of the function of obtaining similar words (phrases), it is necessary to specify the following parameters:













Parameter



Description



Scores



To
return the semantic similarity indexes (the number should take the
meaning “1”).


An Example of a Query (RU)

http://www.paraphraser.ru/api?c=vector&query=ищите женщину&top=3&scores=1&lang=ru&format=json&token=485…64
An Example of an Answer (RU)

{
"code": 0,
"response": {
"1": {
"original": "ищите женщину",
"vector": [
[
"отыскивайте девушку",
0.7048
],
[
"выискивайте девушку",
0.7011
],
[
"отыскивайте мужчину",
0.6609
]
],
"lemma": "искать женщина",
"pos": "VERB NOUN"
}
},
"msg": "OK"
}

An Example of a Query (EN)

http://www.paraphraser.ru/api?c=vector&query=rainy day&top=3&scores=1&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"1": {
"original": "rainy day",
"vector": [
[
"muggy month",
0.755
],
[
"windless month",
0.7492
],
[
"windless week",
0.7437
]
],
"lemma": "rainy day",
"pos": "ADJ NOUN"
}
},
"msg": "OK"
}

A Note

This function can be called together with the function of word forms.

Word Forms

>Status: Active
Returns all the word forms of the words from the vector for the given word (phrase).

Description

The function expands the vector of similar words (phrases), returning all the possible forms of the original word (or words inside the original phrase), as well as all the possible word forms for the resulting vector of words/phrases.

Parameters

In addition to the basic parameters of the function of obtaining similar words (phrases), it is necessary to specify the following parameters:













Parameter



Description



forms



To
return all the word forms (the number should take the value «1»).


An Example of a Query (RU)

http://www.paraphraser.ru/api?c=vector&query=ищите женщину&top=3&forms=1&lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"msg": "OK",
"response": {
"1": {
"pos": "VERB NOUN",
"lemma": "искать женщина",
"forms_query": {
"ищите": [
"ищете",
"искало",
"искали",
"ищешь",
"ищем",
"ищут",
"искала",
"ищу",
"ищет",
"искал"
],
"женщину": [
"женщине",
"женщинами",
"женщины",
"женщинах",
"женщинам",
"женщиной",
"женщина",
"женщин",
"женщину"
]
},
"original": "ищите женщину",
"forms": [
{
"отыскивайте": [
"отыскивает",
"отыскивала",
...
],
"девушку": [
"девушка",
"девушки",
...
]
},
{
"выискивайте": [
"выискивает",
"выискиваю",
...
],
"девушку": [
"девушка",
"девушки",
...
]
},
{
"отыскивайте": [
"отыскивает",
"отыскивала",
...
],
"мужчину": [
"мужчина",
"мужчиной",
...
]
}
],
"vector": [
"отыскивайте девушку",
"выискивайте девушку",
"отыскивайте мужчину",
]
}
}
}

An Example of a Query (EN)

http://www.paraphraser.ru/api?c=vector&query=rainy day&top=3&forms=1&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"msg": "OK",
"response": {
"1": {
"pos": "ADJ NOUN",
"lemma": "rainy day",
"forms_query": {
"rainy": [
"rainy",
"rainier",
"rainiest"
],
"day": [
"day",
"days"
]
},
"original": "rainy day",
"forms": [
{
"muggy": [
"muggy",
"muggier",
"muggiest"
],
"month": [
"month",
"months"
]
},
{
"windless": [
"windless"
],
"month": [
"month",
"months"
]
},
{
"windless": [
"windless"
],
"week": [
"week",
"weeks"
]
}
],
"vector": [
"muggy month",
"windless month",
"windless week",
]
}
}
}

A Note

This function can be called together with the function of the semantic similarity indexes.

Lexical Synonyms

Status: Active for the Russian language. The English version will be activated on 20.07.2017
Returns the synonyms to the given word (phrase) on the basis of the thesaurus.
Description
The function returns the synonyms to the original word or phrase on the basis of synsets from the Yet Another RussNet thesaurus. In a phrase the synonyms are selected for each word in the phrase (but auxiliary parts of speech) and then combined within the phrase.
In addition, for each word inside the phrase, the function returns the initial form and part of speech in the Universal POS tags format. For some auxiliary parts of speech (articles, auxiliary verbs), as well as punctuation marks and other symbols, synonyms are not selected — only the initial form and part of speech are returned.

Parameters





























Parameter



Description



query



The
search word or phrase (the line not more than 90 characters long)



top



The
maximum number of possible combinations is 30



lang



Language
ru» or
«en»)



format



The
output format (should take the meaning «json»)



token



A
unique user’s key


An Example of a Query (RU)

http://www.paraphraser.ru/api?c=syns&query=кошка смотрит в окно&top=3& lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"response": {
"1": {
"original": "кошка смотрит в окно",
"syns": [
"киса глядит на окошко",
"мурка глядит на окошко",
"киска глядит на окошко",
],
"lemma": "кошка смотреть в окно",
"pos": "NOUN VERB ADP NOUN"
}
},
"msg": "OK"
}

An Example of a Query (EN)

http://www.paraphraser.ru/api?c=syns&query=rainy day&top=3& lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"1": {
"original": "rainy day",
"syns": [
"showery twenty-four hours",
"showery twenty-four hour period",
"showery 24-hour interval",
],
"lemma": "rainy day",
"pos": "ADJ NOUN"
}
},
"msg": "OK"
}

A Note

The set of the function input parameters can be expanded to obtain indexes of semantic similarity and word forms. So far, the function is active only for the Russian language.

Determination of the Missing Part of the Sentence

Status: Active for English. The Russian version will be activated on 20.07.2017
Returns the meaning indicating a missing subject or predicate in the sentence.

Description

The function takes a sentence for the input and checks if it has a subject and a predicate.

Parameters

























Parameter



Description



Query



The
search word or phrase (the line not more than 90 characters long)



Lang



Language
ru» or
«en»)



Format



The
input format (should take the meaning «json»)



Token



A
unique user’s key



An Example of a Query (RU)

http://paraphraser.ru/api?c=misent&query=ищите женщину&lang=ru&format=json&token=485…64
An Example of an Answer (RU)
{
"response": {
"missing": ["subject"],
"phrase": [
{
"word": "ищите",
"pos": "VERB",
"lemma": "искать"
},
{
"word": "женщину",
"pos": "NOUN",
"lemma": "женщина"
}
]
},
"code": 0,
"msg": "OK"
}

An Example of a Query (EN)

http://paraphraser.ru/api?c=misent&query=rainy day&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"response": {
"missing": ["predicate"],
"phrase": [
{
"word": "rainy",
"pos": "ADJ",
"lemma": "rainy"
},
{
"word": "day",
"pos": "NOUN",
"lemma": "day"
}
]
},
"code": 0,
"msg": "OK"
}

The API Functions Being Developed:

Hyponyms and Hypernyms


Status: the Russian and English languages testing. The start date is 20.07.2017
Returns hyponyms and hypernyms for words form the query.

Description

The function returns more individual (hyponyms) and more general (hypernyms) concepts for words from the query (except for auxiliary parts of speech) based on the Wiktionary data. The hyponyms and hypernyms are put in the same form as the original word. In the case of a phrase, the function returns hyponyms and hypernyms to each word from the phrase separately (except for the auxiliary parts of speech).

Parameters





























Parameter



Description



query



The
search word or phrase (the line not more than 90 characters long)



top



The
maximum number of hyponyms and hypernyms is 30



lang



Language
ru» or
«en»)



format



The
input format (should take the meaning «json»)



token



A
unique user’s key


An Example of a Query (RU)

http://www.paraphraser.ru/api?c=hyp&query=ищите женщину&top=3&lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"response": {
"1": {
"original": "ищите женщину",
"lemma": "искать женщина",
"pos": "VERB NOUN",
"hyponym": {
"ищите": [
"отыскивайте",
"приискивайте",
"разыскивайте",
],
"женщину": [
"старуху",
"мать",
"барышню"
]
},
"hypernym": {
"ищите": [],
"женщину": [
"человека",
"самку",
"любовницу"
]
},
}
},
"msg": "OK"
}

An Example of a Query (EN)

http://www.paraphraser.ru/api?c=hyp&query=ищите женщину&top=3&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"1": {
"original": "rainy day",
"lemma": "rainy day",
"pos": "ADJ NOUN",
"hyponym": {
"rainy": [],
"day": [
"date",
"tomorrow",
"yesterday"
]
},
"hypernym": {
"rainy": [],
"day": [
"time unit",
"unit of time",
"time"
]
},
}
},
"msg": "OK"
}

Determination of the Query Tone


Status: The Russian and English languages testing. The start date is 30.07.2017


The function returns the tone (general mood) of the query.

Description

The tone or mood of the query is classified as positive, negative or neutral.

Parameters

























Parameter



Description



Query



The
search word or phrase (the line not more than 90 characters long)



Lang



Language
ru» or
«en»)



Format



The
input format (should take the meaning «json»)



Token



The
unique user’s key


An Example of a Query (RU)

http://paraphraser.ru/api?c=sentiment&query=ищите женщину&lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"response": {
"sentiment": "neutral"
},
"msg": "OK"
}

An Example of a Query (EN)

http://paraphraser.ru/api?c=sentiment&query=rainy day&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"sentiment": "negative"
},
"msg": "OK"
}

Determination of the Query Subject Using Wikipedia


Status: The Russian and English languages testing. The start date is 30.07.2017


Returns the query subject using the Wikipedia classification.

Description

The function classifies the query subject on the basis of the Wikipedia categories.

Parameters

























Parameter



Description



query



The
search word or phrase (the line not more than 90 characters long)



lang



Language
ru» or
«en»)



format



The
input format (should take the meaning «json»)



token



A
unique user’s key


An Example of a Query (RU)

http://paraphraser.ru/api?c=wikitopic&query=ищите женщину&lang=ru&format=json&token=485…64

An Example of an Answer (RU)

{
"code": 0,
"response": {
"topics": [
"Фильмы 1982 года",
"Фильмы Аллы Суриковой",
"Телефильмы СССР 1982 года",
"Фильмы студии «Мосфильм»",
"Кинокомедии СССР",
"Кинокомедии 1982 года",
"Детективные фильмы СССР",
"Фильмы о юристах",
"Экранизации произведений Робера Тома"
]
},
"msg": "OK"
}

An Example of a Query (EN)

http://paraphraser.ru/api?c=wikitopic&query=rainy day&lang=en&format=json&token=485…64

An Example of an Answer (EN)

{
"code": 0,
"response": {
"topics": [
"Jangle pop groups",
"Alternative rock groups from California"
]
},
"msg": "OK"
}

Text Rephrasing


Status: The Russian and English languages testing. The start date is 30.08.2017


Rephrasing of texts of an optional subject with a specified proportion of replaceable words.

Description

The function accepts an input optional text of no more than 5000 characters and returns a paraphrased text, where part of the words is replaced by synonyms in the desired form of words. The percentage of the replaced words in the text is regulated by the user.

How It Looks Like

The Linguistic API (Cloud Service) for Chatbot Developers and Linguists
If you need additional tools, just write us: gf@EnduranceRobots.com
If you have a commercial query, call us: 8 916 225 4302
You can access the API via HTTP (the POST and GET methods are supported); besides you can access the API through a special form on:
http://paraphraser.ru/api/form

The description of the API functions, instructions and examples of queries are to be found on:
http://paraphraser.ru/api/doc