Standard NLP Services

Language detection

Detects language of given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

language

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=language&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "language" : [ {
      "start" : 0,
      "end" : 64,
      "value" : "en"
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "language" : [ {
      "start" : 0,
      "end" : 74,
      "value" : "ru"
    } ]
  }
} ]

Sentence detection

Detects boundaries of sentences in a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

sentence

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=sentence&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "sentence" : [ {
      "start" : 0,
      "end" : 64
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "sentence" : [ {
      "start" : 0,
      "end" : 74
    } ]
  }
} ]

Lemmatization

Detects lemma of each word of a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

lemma

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=lemma&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "lemma" : [ {
      "start" : 0,
      "end" : 3,
      "value" : "our"
    }, {
      "start" : 4,
      "end" : 8,
      "value" : "kid"
    }, {
      "start" : 9,
      "end" : 15,
      "value" : "should"
    }, {
      "start" : 16,
      "end" : 20,
      "value" : "grow"
    }, {
      "start" : 21,
      "end" : 23,
      "value" : "up"
    }, {
      "start" : 24,
      "end" : 26,
      "value" : "in"
    }, {
      "start" : 27,
      "end" : 29,
      "value" : "an"
    }, {
      "start" : 30,
      "end" : 37,
      "value" : "america"
    }, {
      "start" : 38,
      "end" : 43,
      "value" : "where"
    }, {
      "start" : 44,
      "end" : 55,
      "value" : "opportunity"
    }, {
      "start" : 56,
      "end" : 58,
      "value" : "be"
    }, {
      "start" : 59,
      "end" : 63,
      "value" : "real"
    }, {
      "start" : 63,
      "end" : 64,
      "value" : ""
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "lemma" : [ {
      "start" : 0,
      "end" : 8,
      "value" : "согласно"
    }, {
      "start" : 9,
      "end" : 21,
      "value" : "официальный"
    }, {
      "start" : 22,
      "end" : 30,
      "value" : "прогноз"
    }, {
      "start" : 31,
      "end" : 48,
      "value" : "минэкономразвития"
    }, {
      "start" : 48,
      "end" : 49,
      "value" : ""
    }, {
      "start" : 50,
      "end" : 53,
      "value" : "ввп"
    }, {
      "start" : 54,
      "end" : 60,
      "value" : "россия"
    }, {
      "start" : 61,
      "end" : 67,
      "value" : "падать"
    }, {
      "start" : 68,
      "end" : 70,
      "value" : "на"
    }, {
      "start" : 71,
      "end" : 73,
      "value" : "3"
    }, {
      "start" : 73,
      "end" : 74,
      "value" : ""
    } ]
  }
} ]

PoS tagging

Detects part of speech tag for each word of a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

pos-token

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=pos-token&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "pos-token" : [ {
      "start" : 0,
      "end" : 3,
      "value" : {
        "type" : "penn",
        "tag" : "OTHER",
        "characters" : [ ]
      }
    }, {
      "start" : 4,
      "end" : 8,
      "value" : {
        "type" : "penn",
        "tag" : "NNS",
        "characters" : [ ]
      }
    }, {
      "start" : 9,
      "end" : 15,
      "value" : {
        "type" : "penn",
        "tag" : "OTHER",
        "characters" : [ ]
      }
    }, {
      "start" : 16,
      "end" : 20,
      "value" : {
        "type" : "penn",
        "tag" : "VB",
        "characters" : [ ]
      }
    }, {
      "start" : 21,
      "end" : 23,
      "value" : {
        "type" : "penn",
        "tag" : "OTHER",
        "characters" : [ ]
      }
    }, {
      "start" : 24,
      "end" : 26,
      "value" : {
        "type" : "penn",
        "tag" : "IN",
        "characters" : [ ]
      }
    }, {
      "start" : 27,
      "end" : 29,
      "value" : {
        "type" : "penn",
        "tag" : "DT",
        "characters" : [ ]
      }
    }, {
      "start" : 30,
      "end" : 37,
      "value" : {
        "type" : "penn",
        "tag" : "NNP",
        "characters" : [ ]
      }
    }, {
      "start" : 38,
      "end" : 43,
      "value" : {
        "type" : "penn",
        "tag" : "OTHER",
        "characters" : [ ]
      }
    }, {
      "start" : 44,
      "end" : 55,
      "value" : {
        "type" : "penn",
        "tag" : "NN",
        "characters" : [ ]
      }
    }, {
      "start" : 56,
      "end" : 58,
      "value" : {
        "type" : "penn",
        "tag" : "VBZ",
        "characters" : [ ]
      }
    }, {
      "start" : 59,
      "end" : 63,
      "value" : {
        "type" : "penn",
        "tag" : "JJ",
        "characters" : [ ]
      }
    }, {
      "start" : 63,
      "end" : 64,
      "value" : {
        "type" : "penn",
        "tag" : "DOT",
        "characters" : [ ]
      }
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "pos-token" : [ {
      "start" : 0,
      "end" : 8,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "PR",
        "characters" : [ ]
      }
    }, {
      "start" : 9,
      "end" : 21,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "A",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Masculine"
        }, {
          "type" : "case",
          "tag" : "Dative"
        }, {
          "type" : "number",
          "tag" : "Singular"
        } ]
      }
    }, {
      "start" : 22,
      "end" : 30,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "S",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Masculine"
        }, {
          "type" : "case",
          "tag" : "Dative"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "animacy",
          "tag" : "Inanimated"
        } ]
      }
    }, {
      "start" : 31,
      "end" : 48,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "S",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Neuter"
        }, {
          "type" : "case",
          "tag" : "Genitive"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "animacy",
          "tag" : "Inanimated"
        } ]
      }
    }, {
      "start" : 48,
      "end" : 49,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "PUNCT",
        "characters" : [ ]
      }
    }, {
      "start" : 50,
      "end" : 53,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "S",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Masculine"
        }, {
          "type" : "case",
          "tag" : "Genitive"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "animacy",
          "tag" : "Inanimated"
        } ]
      }
    }, {
      "start" : 54,
      "end" : 60,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "S",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Feminine"
        }, {
          "type" : "case",
          "tag" : "Genitive"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "animacy",
          "tag" : "Inanimated"
        } ]
      }
    }, {
      "start" : 61,
      "end" : 67,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "V",
        "characters" : [ {
          "type" : "person",
          "tag" : "Third"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "tense",
          "tag" : "NotPast"
        }, {
          "type" : "mode",
          "tag" : "Indicative"
        } ]
      }
    }, {
      "start" : 68,
      "end" : 70,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "PR",
        "characters" : [ ]
      }
    }, {
      "start" : 71,
      "end" : 73,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "S",
        "characters" : [ {
          "type" : "gender",
          "tag" : "Masculine"
        }, {
          "type" : "case",
          "tag" : "Accusative"
        }, {
          "type" : "number",
          "tag" : "Singular"
        }, {
          "type" : "animacy",
          "tag" : "Inanimated"
        } ]
      }
    }, {
      "start" : 73,
      "end" : 74,
      "value" : {
        "type" : "syn-tag-rus",
        "tag" : "PUNCT",
        "characters" : [ ]
      }
    } ]
  }
} ]

Spelling correction

Tries to correct disprints and other spelling errors in a given text. Note: resulting tokens are NOT guaranteed to match input ones because of whitespace errors corrections.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

spelling-correction-token

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=spelling-correction-token&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "spelling-correction-token" : [ {
      "start" : 0,
      "end" : 3,
      "value" : "Our"
    }, {
      "start" : 4,
      "end" : 8,
      "value" : "kids"
    }, {
      "start" : 9,
      "end" : 15,
      "value" : "should"
    }, {
      "start" : 16,
      "end" : 20,
      "value" : "grow"
    }, {
      "start" : 21,
      "end" : 23,
      "value" : "up"
    }, {
      "start" : 24,
      "end" : 26,
      "value" : "in"
    }, {
      "start" : 27,
      "end" : 29,
      "value" : "an"
    }, {
      "start" : 30,
      "end" : 37,
      "value" : "America"
    }, {
      "start" : 38,
      "end" : 43,
      "value" : "where"
    }, {
      "start" : 44,
      "end" : 55,
      "value" : "opportunity"
    }, {
      "start" : 56,
      "end" : 58,
      "value" : "is"
    }, {
      "start" : 59,
      "end" : 63,
      "value" : "real"
    }, {
      "start" : 63,
      "end" : 64,
      "value" : "."
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "spelling-correction-token" : [ {
      "start" : 0,
      "end" : 8,
      "value" : "Согласно"
    }, {
      "start" : 9,
      "end" : 21,
      "value" : "официальному"
    }, {
      "start" : 22,
      "end" : 30,
      "value" : "прогнозу"
    }, {
      "start" : 31,
      "end" : 48,
      "value" : "Минэкономразвития"
    }, {
      "start" : 48,
      "end" : 49,
      "value" : ","
    }, {
      "start" : 50,
      "end" : 53,
      "value" : "ВВП"
    }, {
      "start" : 54,
      "end" : 60,
      "value" : "России"
    }, {
      "start" : 61,
      "end" : 67,
      "value" : "упадет"
    }, {
      "start" : 68,
      "end" : 70,
      "value" : "на"
    }, {
      "start" : 71,
      "end" : 73,
      "value" : "3%"
    }, {
      "start" : 73,
      "end" : 74,
      "value" : "."
    } ]
  }
} ]

Syntactic parsing

Detects syntactic structure for each sentence of a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

syntax-relation

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=syntax-relation&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "syntax-relation" : [ {
      "start" : 0,
      "end" : 3,
      "value" : {
        "parent" : {
          "start" : 16,
          "end" : 20
        },
        "type" : "advmod"
      }
    }, {
      "start" : 4,
      "end" : 8,
      "value" : {
        "parent" : {
          "start" : 16,
          "end" : 20
        },
        "type" : "nsubj"
      }
    }, {
      "start" : 9,
      "end" : 15,
      "value" : {
        "parent" : {
          "start" : 16,
          "end" : 20
        },
        "type" : "dep"
      }
    }, {
      "start" : 16,
      "end" : 20,
      "value" : { }
    }, {
      "start" : 21,
      "end" : 23,
      "value" : {
        "parent" : {
          "start" : 16,
          "end" : 20
        },
        "type" : "advmod"
      }
    }, {
      "start" : 24,
      "end" : 26,
      "value" : {
        "parent" : {
          "start" : 16,
          "end" : 20
        },
        "type" : "prep"
      }
    }, {
      "start" : 27,
      "end" : 29,
      "value" : {
        "parent" : {
          "start" : 30,
          "end" : 37
        },
        "type" : "det"
      }
    }, {
      "start" : 30,
      "end" : 37,
      "value" : {
        "parent" : {
          "start" : 24,
          "end" : 26
        },
        "type" : "pobj"
      }
    }, {
      "start" : 38,
      "end" : 43,
      "value" : {
        "parent" : {
          "start" : 59,
          "end" : 63
        },
        "type" : "punct"
      }
    }, {
      "start" : 44,
      "end" : 55,
      "value" : {
        "parent" : {
          "start" : 59,
          "end" : 63
        },
        "type" : "nsubj"
      }
    }, {
      "start" : 56,
      "end" : 58,
      "value" : {
        "parent" : {
          "start" : 59,
          "end" : 63
        },
        "type" : "cop"
      }
    }, {
      "start" : 59,
      "end" : 63,
      "value" : {
        "parent" : {
          "start" : 30,
          "end" : 37
        },
        "type" : "rcmod"
      }
    }, {
      "start" : 63,
      "end" : 64,
      "value" : {
        "parent" : {
          "start" : 59,
          "end" : 63
        },
        "type" : "dep"
      }
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "syntax-relation" : [ {
      "start" : 0,
      "end" : 8,
      "value" : {
        "parent" : {
          "start" : 61,
          "end" : 67
        },
        "type" : "обст"
      }
    }, {
      "start" : 9,
      "end" : 21,
      "value" : {
        "parent" : {
          "start" : 22,
          "end" : 30
        },
        "type" : "опред"
      }
    }, {
      "start" : 22,
      "end" : 30,
      "value" : {
        "parent" : {
          "start" : 0,
          "end" : 8
        },
        "type" : "предл"
      }
    }, {
      "start" : 31,
      "end" : 48,
      "value" : {
        "parent" : {
          "start" : 22,
          "end" : 30
        },
        "type" : "квазиагент"
      }
    }, {
      "start" : 48,
      "end" : 49,
      "value" : {
        "parent" : {
          "start" : 31,
          "end" : 48
        },
        "type" : "PUNCT"
      }
    }, {
      "start" : 50,
      "end" : 53,
      "value" : {
        "parent" : {
          "start" : 61,
          "end" : 67
        },
        "type" : "предик"
      }
    }, {
      "start" : 54,
      "end" : 60,
      "value" : {
        "parent" : {
          "start" : 50,
          "end" : 53
        },
        "type" : "квазиагент"
      }
    }, {
      "start" : 61,
      "end" : 67,
      "value" : { }
    }, {
      "start" : 68,
      "end" : 70,
      "value" : {
        "parent" : {
          "start" : 61,
          "end" : 67
        },
        "type" : "2-компл"
      }
    }, {
      "start" : 71,
      "end" : 73,
      "value" : {
        "parent" : {
          "start" : 68,
          "end" : 70
        },
        "type" : "предл"
      }
    }, {
      "start" : 73,
      "end" : 74,
      "value" : {
        "parent" : {
          "start" : 71,
          "end" : 73
        },
        "type" : "PUNCT"
      }
    } ]
  }
} ]

Named Entity tagging (English)

Finds all named entities occurences in a given text.

Texterra can finds following named entity classes for English language:

  • DATE

  • LOCATION

  • MONEY

  • ORGANIZATION

  • PERSON

  • TIME

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Our kids should grow up in an America where opportunity is real."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

named-entity

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Our kids should grow up in an America where opportunity is real.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=named-entity&apikey=YOUR_KEY"
json
[ {
  "text" : "Our kids should grow up in an America where opportunity is real.",
  "annotations" : {
    "named-entity" : [ {
      "start" : 30,
      "end" : 37,
      "value" : {
        "type" : "location",
        "tag" : "LOCATION"
      }
    } ]
  }
} ]

Named Entity tagging (Russian)

Finds all named entities occurences in a given text.

Texterra can finds following named entity classes for Russian language:

  • PERSON

  • NORP_NATIONALITY

  • NORP_RELIGION

  • NORP_POLITICAL

  • NORP_OTHER

  • FACILITY

  • ORGANIZATION_CORPORATION

  • ORGANIZATION_EDUCATIONAL

  • ORGANIZATION_POLITICAL

  • ORGANIZATION_OTHER

  • GPE_COUNTRY

  • GPE_CITY

  • GPE_STATE_PROVINCE

  • GPE_OTHER

  • LOCATION_RIVER

  • LOCATION_LAKE_SEA_OCEAN

  • LOCATION_REGION

  • LOCATION_CONTINENT

  • LOCATION_OTHER

  • PRODUCT

  • DATE

  • TIME

  • MONEY

  • EVENT

  • PLANT

  • ANIMAL

  • SUBSTANCE

  • DISEASE

  • WORK_OF_ART

  • LANGUAGE

  • GAME

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

named-entity

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=named-entity&apikey=YOUR_KEY"
json
[ {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "named-entity" : [ {
      "start" : 31,
      "end" : 48,
      "value" : {
        "type" : "bbn",
        "tag" : "ORGANIZATION_POLITICAL"
      }
    }, {
      "start" : 54,
      "end" : 60,
      "value" : {
        "type" : "bbn",
        "tag" : "GPE_COUNTRY"
      }
    } ]
  }
} ]

Coreference resolution

Detects coreference chains (clusters of the same entity mentions).

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "«Мы будем защищать и воздушное пространство, и морскую акваторию, и горный кластер.», — сказал Путин.  По его словам, к обеспечению безопасности будут привлечены силы и средства «такие, которые не задействованы при обеспечении безопасности в других регионах РФ»."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

coreference

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"«Мы будем защищать и воздушное пространство, и морскую акваторию, и горный кластер.», — сказал Путин. По его словам, к обеспечению безопасности будут привлечены силы и средства «такие, которые не задействованы при обеспечении безопасности в других регионах РФ».\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=coreference&apikey=YOUR_KEY"
json
[ {
  "text" : "«Мы будем защищать и воздушное пространство, и морскую акваторию, и горный кластер.», — сказал Путин.  По его словам, к обеспечению безопасности будут привлечены силы и средства «такие, которые не задействованы при обеспечении безопасности в других регионах РФ».",
  "annotations" : {
    "coreference" : [ {
      "start" : 1,
      "end" : 3
    }, {
      "start" : 95,
      "end" : 100,
      "value" : {
        "start" : 1,
        "end" : 3
      }
    }, {
      "start" : 106,
      "end" : 109,
      "value" : {
        "start" : 95,
        "end" : 100
      }
    }, {
      "start" : 186,
      "end" : 193,
      "value" : {
        "start" : 106,
        "end" : 109
      }
    }, {
      "start" : 258,
      "end" : 260,
      "value" : {
        "start" : 186,
        "end" : 193
      }
    } ]
  }
} ]

KB-based NLP Services

Term detection

Extracts not overlapping terms within a given text; term is a textual representation for some concept of the real world.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

frame

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=frame&apikey=YOUR_KEY"
json
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.",
  "annotations" : {
    "frame" : [ {
      "start" : 0,
      "end" : 4,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 21492980
        },
        "commonness" : 0.44984802431610943
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1196708
        },
        "commonness" : 0.016717325227963525
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 10109473
        },
        "commonness" : 0.03343465045592705
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 759920
        },
        "commonness" : 0.5
      } ]
    }, {
      "start" : 29,
      "end" : 42,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 50595
        },
        "commonness" : 1.0
      } ]
    }, {
      "start" : 55,
      "end" : 67,
      "value" : [ {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 4218249
        },
        "commonness" : 0.5
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 37428589
        },
        "commonness" : 0.375
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 2468105
        },
        "commonness" : 0.0625
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 37852
        },
        "commonness" : 0.0625
      } ]
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "frame" : [ {
      "start" : 22,
      "end" : 30,
      "value" : [ {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 128470
        },
        "commonness" : 0.4673913043478261
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 12481396
        },
        "commonness" : 0.25
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 246066
        },
        "commonness" : 0.25
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 60163
        },
        "commonness" : 0.03260869565217391
      } ]
    }, {
      "start" : 31,
      "end" : 48,
      "value" : [ {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 44509
        },
        "commonness" : 0.8409090909090909
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 4535401
        },
        "commonness" : 0.1590909090909091
      } ]
    }, {
      "start" : 50,
      "end" : 60,
      "value" : [ {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 3823761
        },
        "commonness" : 1.0
      } ]
    } ]
  }
} ]

Word sense disambiguation

Detects the most appropriate meanings (concepts) for terms occurred in a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

disambiguated-phrase

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=disambiguated-phrase&apikey=YOUR_KEY"
json
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.",
  "annotations" : {
    "disambiguated-phrase" : [ {
      "start" : 29,
      "end" : 42,
      "value" : {
        "kb-name" : "enwiki",
        "id" : 50595
      }
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "disambiguated-phrase" : [ {
      "start" : 22,
      "end" : 30,
      "value" : {
        "kb-name" : "ruwiki",
        "id" : 128470
      }
    }, {
      "start" : 31,
      "end" : 48,
      "value" : {
        "kb-name" : "ruwiki",
        "id" : 44509
      }
    }, {
      "start" : 50,
      "end" : 60,
      "value" : {
        "kb-name" : "ruwiki",
        "id" : 3823761
      }
    } ]
  }
} ]

Key concepts detection

Key concepts are the concepts providing short (conceptual) and informative text description. This service extracts a set of key concepts for a given text.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

keyconcepts

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=keyconcepts&apikey=YOUR_KEY"
json
[ {
  "text" : "iMac now supports PCIe-based flash storage, making its Fusion Drive and all-flash storage options up to 50 percent faster than the previous generation.",
  "annotations" : {
    "keyconcepts" : [ {
      "start" : 0,
      "end" : 151,
      "value" : [ {
        "concept" : {
          "kb-name" : "enwiki",
          "id" : 50595
        },
        "weight" : 2.0
      } ]
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "keyconcepts" : [ {
      "start" : 0,
      "end" : 74,
      "value" : [ {
        "concept" : {
          "kb-name" : "ruwiki",
          "id" : 3823761
        },
        "weight" : 2.0
      }, {
        "concept" : {
          "kb-name" : "ruwiki",
          "id" : 44509
        },
        "weight" : 1.0
      }, {
        "concept" : {
          "kb-name" : "ruwiki",
          "id" : 128470
        },
        "weight" : 1.0
      } ]
    } ]
  }
} ]

Domain detection

Detects the most appropriate domain for the given text. Currently only 2 specific domains are supported:

  • movie

  • politics

If no domain from this list has been detected, the text is assumed to be no domain, or general domain.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "Both candidates are unable to tell the difference between the Republican Guard and the Revolutionary Guard."
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%."
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

domain

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"Both candidates are unable to tell the difference between the Republican Guard and the Revolutionary Guard.\" }, { \"text\" : \"Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=domain&apikey=YOUR_KEY"
json
[ {
  "text" : "Both candidates are unable to tell the difference between the Republican Guard and the Revolutionary Guard.",
  "annotations" : {
    "domain" : [ {
      "start" : 0,
      "end" : 107,
      "value" : "politics"
    } ]
  }
}, {
  "text" : "Согласно официальному прогнозу Минэкономразвития, ВВП России упадет на 3%.",
  "annotations" : {
    "domain" : [ {
      "start" : 0,
      "end" : 74,
      "value" : "general"
    } ]
  }
} ]

Sentiment analysis Services

Subjectivity detection

Detects whether the given text is subjective or not.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate"
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

subjectivity

tweet

Forces texts to be intterpreted as tweets

required

Query

Boolean

true

domain

Specifies domain (auto-detect if not provided)

optional

Query

{general, movie, politics}

general

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=subjectivity&tweet=true&domain=general&apikey=YOUR_KEY"
json
[ {
  "text" : "mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate",
  "annotations" : {
    "subjectivity" : [ {
      "start" : 0,
      "end" : 97
    } ]
  }
} ]

Sentiment polarity detection

Detects whether the given text has positive, negative or no sentiment.

Method and entrypoint

POST nlp

Request Body
[ {
  "text" : "mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate"
} ]
Request Parameters
Name Description Requirement Type Value Example

targetType

Specifies a desired annotation type in the response

required

Query

Annotation Type

polarity

tweet

Forces texts to be intterpreted as tweets

required

Query

Boolean

true

domain

Specifies domain (auto-detect if not provided)

optional

Query

{general, movie, politics}

general

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "[ { \"text\" : \"mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate\" } ]" "http://api.ispras.ru/texterra/v3.1/nlp?targetType=polarity&tweet=true&domain=general&apikey=YOUR_KEY"
json
[ {
  "text" : "mentioning veterens care which Mccain has voted AGAINST - SUPER GOOOOD point Obama+1 #tweetdebate",
  "annotations" : {
    "polarity" : [ {
      "start" : 0,
      "end" : 97,
      "value" : "POSITIVE"
    } ]
  }
} ]

Term info Services

Terms and features

Determines if Knowledge base contains the specified terms and computes features of the specified types for them.

Available feature types:

  • term just represents presence of corresponding term in Knowledge base.

  • commonness represents meanings of corresponding term associated with their prior probabilities.

  • info-measure represents corresponding term specificity.

Method and entrypoint

POST representation/terms

Request Body
{
  "text" : "An economic and tourism boom following statehood brought rapid economic growth to Majuro.",
  "annotations" : {
    "term-candidate" : [ {
      "start" : 16,
      "end" : 28
    }, {
      "start" : 82,
      "end" : 88
    } ]
  }
}
Request Parameters
Name Description Requirement Type Value Example

featureType

Specifies types of features required to compute

required, multiple

Query

{term, commonness, info-measure}

[term, commonness, info-measure]

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: application/json"  -d "{ \"text\" : \"An economic and tourism boom following statehood brought rapid economic growth to Majuro.\", \"annotations\" : { \"term-candidate\" : [ { \"start\" : 16, \"end\" : 28 }, { \"start\" : 82, \"end\" : 88 } ] } }" "http://api.ispras.ru/texterra/v3.1/representation/terms?featureType=term&featureType=commonness&featureType=info-measure&apikey=YOUR_KEY"
json
{
  "text" : "An economic and tourism boom following statehood brought rapid economic growth to Majuro.",
  "annotations" : {
    "term" : [ {
      "start" : 82,
      "end" : 88
    } ],
    "commonness" : [ {
      "start" : 82,
      "end" : 88,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 57037
        },
        "commonness" : 0.9500891265597148
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 7104892
        },
        "commonness" : 0.049910873440285206
      } ]
    } ],
    "info-measure" : [ {
      "start" : 82,
      "end" : 88,
      "value" : 0.5626880526542664
    } ]
  }
}

Terms search and features

Determines terms contained in Knowledge base and computes features of the specified types for them.

Available feature types:

  • term just represents presence of corresponding term in Knowledge base.

  • commonness represents meanings of corresponding term associated with their prior probabilities.

  • info-measure represents corresponding term specificity.

Method and entrypoint

POST representation/allTerms

Request Body
Heine works in Majuro
Request Parameters
Name Description Requirement Type Value Example

featureType

Specifies types of features required to compute

required, multiple

Query

{term, commonness, info-measure}

[term, commonness, info-measure]

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XPOST -H "Accept: application/json"  -H "Content-Type: text/plain"  -d "Heine works in Majuro" "http://api.ispras.ru/texterra/v3.1/representation/allTerms?featureType=term&featureType=commonness&featureType=info-measure&apikey=YOUR_KEY"
json
{
  "text" : "Heine works in Majuro",
  "annotations" : {
    "term" : [ {
      "start" : 0,
      "end" : 5
    }, {
      "start" : 6,
      "end" : 11
    }, {
      "start" : 6,
      "end" : 14
    }, {
      "start" : 12,
      "end" : 14
    }, {
      "start" : 15,
      "end" : 21
    } ],
    "commonness" : [ {
      "start" : 0,
      "end" : 5,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 3119703
        },
        "commonness" : 0.2751677852348993
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 104641
        },
        "commonness" : 0.4966442953020134
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 323305
        },
        "commonness" : 0.22818791946308725
      } ]
    }, {
      "start" : 6,
      "end" : 11,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1483291
        },
        "commonness" : 0.003601440576230492
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 5058918
        },
        "commonness" : 0.15714285714285714
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 491819
        },
        "commonness" : 0.003001200480192077
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 4042159
        },
        "commonness" : 0.22857142857142856
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 14885323
        },
        "commonness" : 0.004801920768307323
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 19389176
        },
        "commonness" : 0.007202881152460984
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 3830968
        },
        "commonness" : 0.01020408163265306
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 2583747
        },
        "commonness" : 0.015606242496998799
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 33663
        },
        "commonness" : 0.0078031212484993995
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 14212326
        },
        "commonness" : 0.006602641056422569
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 25705777
        },
        "commonness" : 0.003601440576230492
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 10391760
        },
        "commonness" : 0.012605042016806723
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 22802337
        },
        "commonness" : 0.018607442977190875
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 3616613
        },
        "commonness" : 0.06422569027611044
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 13005472
        },
        "commonness" : 0.006602641056422569
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 479358
        },
        "commonness" : 0.004201680672268907
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 11896315
        },
        "commonness" : 0.003001200480192077
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 523882
        },
        "commonness" : 0.006002400960384154
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 19556716
        },
        "commonness" : 0.01680672268907563
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1650227
        },
        "commonness" : 0.006002400960384154
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 34572588
        },
        "commonness" : 0.004201680672268907
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1525436
        },
        "commonness" : 0.029411764705882353
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 149861
        },
        "commonness" : 0.1332533013205282
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 47962
        },
        "commonness" : 0.003601440576230492
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 2562990
        },
        "commonness" : 0.006602641056422569
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 12447476
        },
        "commonness" : 0.029411764705882353
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 38831284
        },
        "commonness" : 0.011404561824729893
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 11792167
        },
        "commonness" : 0.01020408163265306
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 3703232
        },
        "commonness" : 0.11428571428571428
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 323158
        },
        "commonness" : 0.004801920768307323
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 314993
        },
        "commonness" : 0.05162064825930372
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 18178
        },
        "commonness" : 0.009603841536614645
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1655145
        },
        "commonness" : 0.005402160864345739
      } ]
    }, {
      "start" : 6,
      "end" : 14,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 366288
        },
        "commonness" : 0.0625
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1708714
        },
        "commonness" : 0.3125
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 36257782
        },
        "commonness" : 0.3125
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1886502
        },
        "commonness" : 0.3125
      } ]
    }, {
      "start" : 12,
      "end" : 14,
      "value" : [ {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 74367
        },
        "commonness" : 0.05555555555555555
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 179237
        },
        "commonness" : 0.006372549019607843
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 14775
        },
        "commonness" : 0.09362745098039216
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 21883857
        },
        "commonness" : 0.2269607843137255
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 5656319
        },
        "commonness" : 0.016176470588235296
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 24050869
        },
        "commonness" : 0.045098039215686274
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 4692723
        },
        "commonness" : 0.005392156862745098
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 1233950
        },
        "commonness" : 0.11904761904761904
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 5869844
        },
        "commonness" : 0.007352941176470588
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 14533
        },
        "commonness" : 0.02107843137254902
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 41268
        },
        "commonness" : 0.003431372549019608
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 225992
        },
        "commonness" : 0.0029411764705882353
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 159658
        },
        "commonness" : 0.043627450980392155
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 1113861
        },
        "commonness" : 0.008333333333333333
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 14749
        },
        "commonness" : 0.014705882352941176
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 253071
        },
        "commonness" : 0.004901960784313725
      }, {
        "meaning" : {
          "kb-name" : "ruwiki",
          "id" : 12299
        },
        "commonness" : 0.3253968253968254
      } ]
    }, {
      "start" : 15,
      "end" : 21,
      "value" : [ {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 57037
        },
        "commonness" : 0.9500891265597148
      }, {
        "meaning" : {
          "kb-name" : "enwiki",
          "id" : 7104892
        },
        "commonness" : 0.049910873440285206
      } ]
    } ],
    "info-measure" : [ {
      "start" : 0,
      "end" : 5,
      "value" : 0.08568142354488373
    }, {
      "start" : 6,
      "end" : 11,
      "value" : 0.012571838684380054
    }, {
      "start" : 6,
      "end" : 14,
      "value" : 2.661034232005477E-4
    }, {
      "start" : 12,
      "end" : 14,
      "value" : 6.084076012484729E-4
    }, {
      "start" : 15,
      "end" : 21,
      "value" : 0.5626880526542664
    } ]
  }
}

Concept info Services

Neighbors for concepts

Return neighbour concepts for the given concepts.

Method and entrypoint

GET walker/:concepts/neighbours;{linkType};{nodeType};{minDepth};{maxDepth}

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which neighbours should be provided

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki

linkType

Searching for neightbour concepts only along these link types.

optional*, multiple

MatrixPath

Link Type

SEE_ALSO

nodeType

Searching for neightbour concepts only of these types.

optional*, multiple

MatrixPath

Node Type

REGULAR

minDepth

Minimum distance from original to result concepts.

optional*, multiple

MatrixPath

integer >= 0

0

maxDepth

Maximum distance from original to result concepts.

optional*, multiple

MatrixPath

integer >= 0

1

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/walker/id=12:enwiki/neighbours;linkType=SEE_ALSO;nodeType=REGULAR;minDepth=0;maxDepth=1?apikey=YOUR_KEY"
xml
<elements>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="0"/>
    <concept>
      <id>
        903360
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="0"/>
    <concept>
      <id>
        14946461
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="0"/>
    <concept>
      <id>
        12
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="0"/>
    <concept>
      <id>
        1228884
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="0"/>
    <concept>
      <id>
        3225498
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
</elements>

Neighbors count for concepts

Return number of neighbour concepts for the given concepts.

Method and entrypoint

GET walker/:concepts/neighbours;{linkType};{nodeType};{minDepth};{maxDepth}/size

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which neighbours should be provided

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki

linkType

Searching for neightbour concepts only along these link types.

optional*, multiple

MatrixPath

Link Type

SEE_ALSO

nodeType

Searching for neightbour concepts only of these types.

optional*, multiple

MatrixPath

Node Type

REGULAR

minDepth

Minimum distance from original to result concepts.

optional*, multiple

MatrixPath

integer >= 0

0

maxDepth

Maximum distance from original to result concepts.

optional*, multiple

MatrixPath

integer >= 0

1

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/walker/id=12:enwiki/neighbours;linkType=SEE_ALSO;nodeType=REGULAR;minDepth=0;maxDepth=1/size?apikey=YOUR_KEY"
xml
<size>
  5
</size>

Similarity graph between each pair of concepts

Compute similarity for each pair of concepts.

Method and entrypoint

GET similarity/:concepts;{linkWeight}/graph

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which similarity graph should be computed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki;id=13137:enwiki;id=156327:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;id=13137:enwiki;id=156327:enwiki;linkWeight=MAX/graph?apikey=YOUR_KEY"
xml
<full-similarity-graph>
  <concept-2-position class="java.util.HashMap">
    <entry>
      <concept>
        <id>
          13137
        </id>
        <kbname>
          enwiki
        </kbname>
      </concept>
      <integer>
        2
      </integer>
    </entry>
    <entry>
      <concept>
        <id>
          12
        </id>
        <kbname>
          enwiki
        </kbname>
      </concept>
      <integer>
        0
      </integer>
    </entry>
    <entry>
      <concept>
        <id>
          156327
        </id>
        <kbname>
          enwiki
        </kbname>
      </concept>
      <integer>
        1
      </integer>
    </entry>
  </concept-2-position>
  <similarity length="2">
    <double length="2">
      0.027283886735952716, 0.017320915142422483
    </double>
    <double length="1">
      7.489867346339578E-6
    </double>
  </similarity>
</full-similarity-graph>

All pairs similarity

Computes sum of similarities from each concepts from the first list to all concepts from the second one.

Method and entrypoint

GET similarity/:firstConcepts;{linkWeight}/summed/:secondConcepts

Request Parameters
Name Description Requirement Type Value Example

firstConcepts

Specifies concepts for which summed similarities should be computed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki;id=13137:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

secondConcepts

Specifies concepts similarities to which should be summed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;id=13137:enwiki;linkWeight=MAX/summed/id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki?apikey=YOUR_KEY"
xml
<all-pairs-similarity>
  <sim>
    0.00229046443739453
  </sim>
  <sim>
    0.049487326922077676
  </sim>
</all-pairs-similarity>

Similarity to virtual article

Compute similarity from each concept from the first list to all concepts from the second list as a whole. Links of second list concepts are collected together, thus forming a "virtual" article, similarity to which is computed.

Method and entrypoint

GET similarity/:firstConcepts;{linkWeight}/toVirtualArticle/:secondConcepts

Request Parameters
Name Description Requirement Type Value Example

firstConcepts

Specifies concepts for which similarities to "virtual" article should be computed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki;id=13137:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

secondConcepts

Specifies concepts, forming a "virtual" article

path/matrix parameter, required, multiple

Path

Concept Identifier

id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;id=13137:enwiki;linkWeight=MAX/toVirtualArticle/id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki?apikey=YOUR_KEY"
xml
<relatedness-to-context>
  <rel>
    0.0011340439724203517
  </rel>
  <rel>
    0.03074810424229398
  </rel>
</relatedness-to-context>

Similarity between virtual articles

Compute similarity between two sets of concepts as between "virtual" articles from these sets. The links of each virtual article are composed of links of the collection of concepts.

Method and entrypoint

GET similarity/:firstConcepts;{linkWeight}/betweenVirtualArticles/:secondConcepts

Request Parameters
Name Description Requirement Type Value Example

firstConcepts

Specifies concepts, forming the first "virtual" article

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki;id=13137:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

secondConcepts

Specifies concepts, forming the second "virtual" article

path/matrix parameter, required, multiple

Path

Concept Identifier

id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;id=13137:enwiki;linkWeight=MAX/betweenVirtualArticles/id=156327:enwiki;id=15942292:enwiki;id=1921431:enwiki?apikey=YOUR_KEY"
xml
<virtual-articles-similarity>
  0.02361112005811631
</virtual-articles-similarity>

Similar concepts over first neighbours of the given ones

Search for similar concepts among the first neighbours of the given ones.

Method and entrypoint

GET similarity/:concepts;{linkWeight}/similar/neighbours

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which similar concepts should be computed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

offset

Provides a possibility to skip several concepts from the start of the result.

optional, single

Query

integer >= 0

10

limit

Provides a possibility to limit size of result.

optional, single

Query

integer >= 0

2

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;linkWeight=MAX/similar/neighbours?offset=10&limit=2&apikey=YOUR_KEY"
xml
<elements>
  <object class="ru.ispras.texterra.core.ekb.interfaces.ISimilarityComputer$ConceptWithSimilarity">
    <concept>
      <id>
        88459
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
    <weight>
      0.31874893541934296
    </weight>
  </object>
  <object class="ru.ispras.texterra.core.ekb.interfaces.ISimilarityComputer$ConceptWithSimilarity">
    <concept>
      <id>
        1461314
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
    <weight>
      0.3162916870354659
    </weight>
  </object>
</elements>

Similar concepts over filtered set of first and second neighbours

Search for similar concepts over filtered set of the first and the second neighbours.

Method and entrypoint

GET similarity/:concepts;{linkWeight}/similar/all

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which similar concepts should be computed

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki

linkWeight

Specifies method for computation of link weight in case of multiple link types.

matrix parameter, required, single

MatrixPath

Link Weighter

MAX

offset

Provides a possibility to skip several concepts from the start of the result.

optional, single

Query

integer >= 0

10

limit

Provides a possibility to limit size of result.

optional, single

Query

integer >= 0

2

among

Specifies how to filter neighbour concepts when searching for most similar

required, single

Query

Similar Candidates Filter

PORTION(0.2)

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/similarity/id=12:enwiki;linkWeight=MAX/similar/all?offset=10&limit=2&among=PORTION%280.2%29&apikey=YOUR_KEY"
xml
<elements>
  <object class="ru.ispras.texterra.core.ekb.interfaces.ISimilarityComputer$ConceptWithSimilarity">
    <concept>
      <id>
        88459
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
    <weight>
      0.31874893541934296
    </weight>
  </object>
  <object class="ru.ispras.texterra.core.ekb.interfaces.ISimilarityComputer$ConceptWithSimilarity">
    <concept>
      <id>
        1461314
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
    <weight>
      0.3162916870354659
    </weight>
  </object>
</elements>

Get attributes

Get attributes for concepts.

Method and entrypoint

GET walker/:concepts

Request Parameters
Name Description Requirement Type Value Example

concepts

Specifies concepts for which attributes should be provided

path/matrix parameter, required, multiple

Path

Concept Identifier

id=12:enwiki;id=9:ruwiki

attribute

Specifies attributes to be included into response.

optional, multiple

Query

Attributes

title

apikey

Authorizes to use the service

required

Query

String (40 chars)

YOUR_KEY

Responses

Request
curl -XGET -H "Accept: application/xml"  "http://api.ispras.ru/texterra/v3.1/walker/id=12:enwiki;id=9:ruwiki?attribute=title&apikey=YOUR_KEY"
xml
<elements>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="1">
      <I-attribute class="ru.ispras.texterra.core.common.concept.TitleAttribute">
        Россия
      </I-attribute>
    </attributes>
    <concept>
      <id>
        9
      </id>
      <kbname>
        ruwiki
      </kbname>
    </concept>
  </object>
  <object class="ru.ispras.texterra.core.common.concept.AttributedConcept">
    <attributes length="1">
      <I-attribute class="ru.ispras.texterra.core.common.concept.TitleAttribute">
        Anarchism
      </I-attribute>
    </attributes>
    <concept>
      <id>
        12
      </id>
      <kbname>
        enwiki
      </kbname>
    </concept>
  </object>
</elements>
Request
curl -XGET -H "Accept: application/json"  "http://api.ispras.ru/texterra/v3.1/walker/id=12:enwiki;id=9:ruwiki?attribute=title&apikey=YOUR_KEY"
json
{
  "9:ruwiki" : {
    "title" : "Россия"
  },
  "12:enwiki" : {
    "title" : "Anarchism"
  }
}

Data types

Concept Identifier

Represents concept from the Knowledge base.

<id>:<kbname>

<id> - concept id

<kbname> - name of Knowledge base

Concept Identifier with Weight

Represents concept from the Knowledge base with specified weight

<id>:<kbname>:<weight>

<id> - concept id (integer > 0)

<kbname> - name of Knowledge base

<weight> - concept weight (double)

Type of link between two concepts.

Supported values:

  • REGULAR - general link from one concept to another

  • SEE_ALSO - link to strongly related concept

  • RELATED - link to related concept

  • CATEGORY - link to category concept for the given one

  • BACK_REGULAR - inverse for REGULAR

  • BACK_SEE_ALSO - inverse for SEE_ALSO

  • BACK_RELATED - inverse for RELATED

  • BACK_CATEGORY - inverse for CATEGORY

  • INFO_BOX - link to concept from infobox

  • BACK_INFO_BOX - inverse for INFO_BOX

  • DOUBLE - special link type, which takes place when two concepts link to each other with REGULAR or SEE_ALSO links

Node Type

Type of concept.

Supported values:

  • REGULAR - general concept in Knowledge base

  • CATEGORY - category concept which may contain REGULAR and other CATEGORY concepts.

One can use CATEGORY and BACK_CATEGORY link types to traverse category structure of the Knowledge base.

Specifies method for computation of link weight in case given link has several types (and each link type has its own weight).

Supported values:

  • MAX - link weight is maximum amoung weights of this link types

  • MIN - link weight is minimum amoung weights of this link types

  • SUM - link weight is sum of weights of this link types

  • AVG - link weight is average of weights of this link types

Similar Candidates Filter

Specifies how to find most similar concepts for the given one. At first most similar nodes are searched among actual neighbours of the concept. After that filter is appied. Then most similar nodes are additionally searched for among kept concepts neighbours.

Supported values:

  • NUMBER - select first <number> concepts with top similarity measure

    • <number> - integer, specifying number of concepts to keep

  • PORTION - select <portion> portion of concepts with top similarity measure

    • <portion> - double from 0.0 to 1.0, specifying the portion of concepts to keep

  • SIMILARITY - keep concepts with similarity >= <sim>

    • <sim> - double similarity threshold for kept concepts

Attributes

Each concept may be associated with some additional information - attributes.

Supported attribute types:

  • coordinates - GPS coordinates

  • definition - brief concept definition

  • url(<language>) - URL to page with description of the given concept on the specified language

    • <language> - optional language code, like: en, de, fr, ko, ru, …​

  • synonym - different textual representations of the concept

  • title - concept title

  • translation(<language>) textual representation of the concept on the specified language

    • <language> - language code, like: en, de, fr, ko, ru, …​

  • type - concept type