EnduranceRobots.com together with ParaPhraser.ru offer a universal API linguistic service open for everybody:
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.
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.
Parameter | Description |
Query | The |
Top | The |
Lang | Language |
Format | The |
Token | A |
http://www.paraphraser.ru/api?c=vector&query=ищите женщину&top=3&lang=ru&format=json&token=485…64
{
"code": 0,
"response": {
"1": {
"original": "ищите женщину",
"vector": [
"отыскивайте девушку",
"выискивайте девушку",
"отыскивайте мужчину",
],
"lemma": "искать женщина",
"pos": "VERB NOUN"
}
},
"msg": "OK"
}
http://www.paraphraser.ru/api?c=vector&query=rainy day&top=3&lang=en&format=json&token=485…64
{
"code": 0,
"response": {
"1": {
"original": "rainy day",
"vector": [
"muggy month",
"windless month",
"windless week",
],
"lemma": "rainy day",
"pos": "ADJ NOUN"
}
},
"msg": "OK"
}
The set of input parameters of this function can be expanded to obtain semantic similarity indexes and word forms.
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.
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.
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 |
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"
}
{
"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"
}
This function can be called together with the function of word forms.
>Status: Active
Returns all the word forms of the words from the vector for the given word (phrase).
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.
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 |
{
"code": 0,
"msg": "OK",
"response": {
"1": {
"pos": "VERB NOUN",
"lemma": "искать женщина",
"forms_query": {
"ищите": [
"ищете",
"искало",
"искали",
"ищешь",
"ищем",
"ищут",
"искала",
"ищу",
"ищет",
"искал"
],
"женщину": [
"женщине",
"женщинами",
"женщины",
"женщинах",
"женщинам",
"женщиной",
"женщина",
"женщин",
"женщину"
]
},
"original": "ищите женщину",
"forms": [
{
"отыскивайте": [
"отыскивает",
"отыскивала",
...
],
"девушку": [
"девушка",
"девушки",
...
]
},
{
"выискивайте": [
"выискивает",
"выискиваю",
...
],
"девушку": [
"девушка",
"девушки",
...
]
},
{
"отыскивайте": [
"отыскивает",
"отыскивала",
...
],
"мужчину": [
"мужчина",
"мужчиной",
...
]
}
],
"vector": [
"отыскивайте девушку",
"выискивайте девушку",
"отыскивайте мужчину",
]
}
}
}
{
"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",
]
}
}
}
This function can be called together with the function of the semantic similarity indexes.
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.
Parameter | Description |
query | The |
top | The |
lang | Language |
format | The |
token | A |
{
"code": 0,
"response": {
"1": {
"original": "кошка смотрит в окно",
"syns": [
"киса глядит на окошко",
"мурка глядит на окошко",
"киска глядит на окошко",
],
"lemma": "кошка смотреть в окно",
"pos": "NOUN VERB ADP NOUN"
}
},
"msg": "OK"
}
http://www.paraphraser.ru/api?c=syns&query=rainy day&top=3& lang=en&format=json&token=485…64
{
"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"
}
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.
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.
The function takes a sentence for the input and checks if it has a subject and a predicate.
Parameters
Parameter | Description |
Query | The |
Lang | Language |
Format | The |
Token | A |
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"
}
http://paraphraser.ru/api?c=misent&query=rainy day&lang=en&format=json&token=485…64
{
"response": {
"missing": ["predicate"],
"phrase": [
{
"word": "rainy",
"pos": "ADJ",
"lemma": "rainy"
},
{
"word": "day",
"pos": "NOUN",
"lemma": "day"
}
]
},
"code": 0,
"msg": "OK"
}
Status: the Russian and English languages testing. The start date is 20.07.2017
Returns hyponyms and hypernyms for words form the query.
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 |
top | The |
lang | Language |
format | The |
token | A |
http://www.paraphraser.ru/api?c=hyp&query=ищите женщину&top=3&lang=ru&format=json&token=485…64
{
"code": 0,
"response": {
"1": {
"original": "ищите женщину",
"lemma": "искать женщина",
"pos": "VERB NOUN",
"hyponym": {
"ищите": [
"отыскивайте",
"приискивайте",
"разыскивайте",
],
"женщину": [
"старуху",
"мать",
"барышню"
]
},
"hypernym": {
"ищите": [],
"женщину": [
"человека",
"самку",
"любовницу"
]
},
}
},
"msg": "OK"
}
http://www.paraphraser.ru/api?c=hyp&query=ищите женщину&top=3&lang=en&format=json&token=485…64
{
"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"
}
The function returns the tone (general mood) of the query.
The tone or mood of the query is classified as positive, negative or neutral.
Parameter | Description |
Query | The |
Lang | Language |
Format | The |
Token | The |
http://paraphraser.ru/api?c=sentiment&query=ищите женщину&lang=ru&format=json&token=485…64
{
"code": 0,
"response": {
"sentiment": "neutral"
},
"msg": "OK"
}
http://paraphraser.ru/api?c=sentiment&query=rainy day&lang=en&format=json&token=485…64
{
"code": 0,
"response": {
"sentiment": "negative"
},
"msg": "OK"
}
Returns the query subject using the Wikipedia classification.
The function classifies the query subject on the basis of the Wikipedia categories.
Parameter | Description |
query | The |
lang | Language |
format | The |
token | A |
http://paraphraser.ru/api?c=wikitopic&query=ищите женщину&lang=ru&format=json&token=485…64
{
"code": 0,
"response": {
"topics": [
"Фильмы 1982 года",
"Фильмы Аллы Суриковой",
"Телефильмы СССР 1982 года",
"Фильмы студии «Мосфильм»",
"Кинокомедии СССР",
"Кинокомедии 1982 года",
"Детективные фильмы СССР",
"Фильмы о юристах",
"Экранизации произведений Робера Тома"
]
},
"msg": "OK"
}
http://paraphraser.ru/api?c=wikitopic&query=rainy day&lang=en&format=json&token=485…64
{
"code": 0,
"response": {
"topics": [
"Jangle pop groups",
"Alternative rock groups from California"
]
},
"msg": "OK"
}
Rephrasing of texts of an optional subject with a specified proportion of replaceable words.
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.
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