ESA Semantic Relatedness

Welcome to the ESA Semantic Relatedness API. This implementation is based on Explicit Semantic Analysis which describes a method for calculating semantic similarities between linguistic items based on their distributional semantic properties over Wikipedia. Distributional semantic models such as ESA are based on the Distributional Hypothesis, which states that words co-occurring in similar contexts tend to have similar meaning.

For some applications and examples see Amtera Web APIs.

Using the API

To use the API you must:

  • append the language code to the endpoint URL:
    /relatedness/en
  • provide a JSON payload with the following structure:
    {
      "t1": "Chris Froome wins Tour de France",
      "t2": "Wikinews interviews Spanish Paralympic track and field athlete David Casinos"
    }

or

    {
      "t1": "Chris Froome wins Tour de France",
      "t2": "Queensland government not doing enough on water: Poll"
    }

Each text must be 120 char. max.

  • get the results:
    {
      "t1": "Chris Froome wins Tour de France",
      "t2": "Wikinews interviews Spanish Paralympic track and field athlete David Casinos",
      "v": 0.0038747663
    }

or

    {
      "t1": "Chris Froome wins Tour de France",
      "t2": "Queensland government not doing enough on water: Poll",
      "v": 0.0007662044
    }

showing that the first pair of texts is closer in meaning than the second one.

Billing

You will be charged based on the number of compared pairs. Currently, it's only possible to submit one pair per request, but this may not be the case in the future.

Last 7 days, UTC

Average Latency
37ms

Average Uptime
100.0%

Current Status
Online

  • No information
  • Outage
  • Disruption
  • Normal
Average latency determined from Mashape to API Response time

Simple & Straightforward Pricing

Pay as you go. No long-term contracts.

Freemium

$0

additional fees may apply

pairs

5,000 / day

$0.0500 per extra

Subscribe

premium

$349.90

per month

pairs

500,000 / day

$0.0020 per extra

Subscribe

Endpoints

HTTP 200 : Relatedness Response Model POST/relatedness/{lang}
						{
  "t1": "car",
  "t2": "engine",
  "value": 0.0078
}						
Relatedness

Calculates the semantic relatedness between pairs of text excerpts based on the likeness of their meaning or semantic content.


Test console
Description
Parameter
string

The language of the texts you are submitting. Supported languages are en (for English) and pt (for Portuguese).
Example: en

lang

Required

Request Body

You must have an API key to test this API!


Mashape allows developers to find, consume, and distribute cloud APIs just like ESA Semantic Relatedness.

Login to your account or signup: Create Account

or
   Signup with GitHub

By signing up you agree to our terms of service.