Linguatools Translate API

Content:
Overview
Connect to API
Test the API
API response
Code snippets
Examples of use
Dictionary sources

Overview

Looks up a word in a dictionary and returns all translations ordered by frequency. The API translates from and to German for the following languages: English, Spanish, Dutch, Polish, Italian, and Czech. Possibility to filter by a word class and by minimum frequency.

How to use Linguatools Translate API

Connect to API

Endpoint and Parameters

Endpoint:
GET /?langpair={lang1-lang2}&query={word}&wortart={wordclass}&min_freq={number}

URL parameters:

parameter description parameter value
query any word (Case insensitive) ex. change
langpair One of the following combinations (Case sensitive): de-en, de-es, de-nl, de-pl, de-it, de-cs,
en-de, es-de, nl-de, pl-de, it-de cs-de
wortart One of the following word classes (Case sensitive, optional): NOMEN, ADJ, VERB, ADVERB
min_freq any number 1,2,3,75334, etc.

Test the API

You can test the API and develop your own application with out test translate API – for free.

Test the test API with:

  • langpair: de-en
  • query: Anzahl
  • wortart: VERB (optional)

http request

https://lt-translate-test.herokuapp.com/mashapes?langpair=en-de&query=change&wortart=VERB
wget "https://lt-translate-test.herokuapp.com/mashapes?langpair=en-de&query=change&wortart=VERB"

Important note (!)::
The initial API call might take up to 15 seconds because the heroku dyno falls asleep after 30 minutes of inactivity.
(The TEST-API runs on a free heroku dyno.)

Further limits of the test API
The test API contains only a subset of the complete dictionary database. Therefore only high frequent words are included.
E.g.: change, cover and make are high frequent words.

API response

l1_text: german word
l2_text: translation of the german word
wortart: word class (NOMEN, ADJ, VERB, ADVERB)
synonyme1: „Synonyms“ for the translation of the German word, creating by listing alternative translations.
synomyme2: „Synonyms“ for the German word, creating by listing alternative translations of the translation of the German word.
freq: The number specifies how often the translation was used in our database of translated documents. The higher the number the more common the translation.
Note: Since there is always noice in the dictionary sources as well as in the translated documents, in order to make sure that you only get correct translation you can set the query parameter min_freq (minimum frequency) to 1 to get only translations that have occured at least once in our corpus. Compare the result of the two api calls with and without min_freq:

Without min_freq:
https://lt-translate-test.herokuapp.com/mashapes?langpair=en-de&query=change&wortart=VERB

With min_freq = 15000:
https://lt-translate-test.herokuapp.com/mashapes?langpair=en-de&query=change&wortart=VERB&min_freq=15000

Code snippets

Ruby

Python

Dictionary sources

The dictionary is compiled from the following sources:
IATE, Wiktionary, EMWN, OmegaWiki, EuroVoc, Frank Richters Glossar, linguatools manually edited dictionary

Number of translations in the complete dictionary database:

de-en/en-de: 990.568
de-es/es-de: 609.346
de-it/it-de: 678.246
de-cs/cs-de: 66.773
de-pl/pl-de: 89.056
de-nl/nl-de: 647.464

Examples of use

linguatools context dictionaries:
German-Englisch, German-Spanish, German-Polish, German-Czech, German-Dutch, German-Italian

If you want to use the translate API in your project please contact peter.kolb@linguatools.org for pricing and licence conditions.
Other language APIs by linguatools: https://linguatools.org/language-apis/