Lexicala

FREEMIUM
By Lexicala | Updated 5일 전 | Data
Popularity

9.9 / 10

Latency

141ms

Service Level

100%

Health Check

N/A

README

The Lexicala Web API is a RESTful API that provides lexical data of K Dictionaries originating from lexicographical resources covering 50 languages, and including monolingual cores as well as numerous bilingual pairs and multilingual combinations. The API returns data as JSON documents.

GETTING STARTED

You can test that the API is up with GET /test.

API USER ACCOUNT
You can view your user account settings with GET /users/me.

This includes the personal details such as your name and the email you have provided upon registration, your request cap, and the number of requests used in the last 24 hours.

API DATA
Information about languages available through the API can be obtained with GET /languages, including the full names corresponding to language codes, and the languages available in the various resources.

By default, results are from KD’s Global series. Data from the Password Series and from Random House Webster’s College Dictionary are also available. The Global series includes 24 monolingual cores (see list below), which are added translation equivalents, producing multilingual versions. The Password series consists of an English core, translated to 46 languages. The Random House Webster’s College Dictionary is an extensive monolingual English dictionary. You can find more information about the different resources on our website.

GET /search
Search for entries with GET /search. This returns the number of results and a paginated list of entries found.

A basic API search result consists of a JSON object containing partial lexical information on entries that match the search criteria, the number of said entries, and the number of result pages. (To obtain further, more in-depth information for each entry, search by entry ID)

The result JSON object has the fields n_results, results_per_page, n_pages (with a number as value), and results – an array containing the relevant entries.

The entries are returned as objects within the results array, and contain the following fields:

  • the unique entry ID
  • the source language code
  • the headword text
  • part of speech
  • the different senses with their unique sense ID and definition

Basic search parameters include:

  • source ( = global, password, random) - specify which resource to look in.
  • the default value is global (the Global series).
  • language ( = en, fr, es, de, pl, …) - specify which source language to look in.
  • text - specify a headword.

For example: /search?source=global&language=es&text=azul
This query returns all entries in the Spanish core of the Global series with the headword “azul”.

It is possible to look for headwords with specific syntactic criteria:

  • pos ( = noun, verb, …) - specify part of speech.
  • number ( = singular, plural, …) - specify grammatical number.
  • gender ( = masculine, feminine, …) - specify grammatical gender.
  • subcategorization ( = masculine, feminine, …) - specify subcategorization.
  • monosemous (boolian) - find single sense entries only.
  • polysemous (boolian) - find multiple sense entries only.

The API also includes two functionalities pertaining to inflected forms and word stems:

  • morph (boolian) - searches for the text in both headwords and inflections, including in our supplemental morphological lists. This is based on existing human-curated data and semi-automatic morphological lists.
  • analyzed (boolian) - a stemmer algorithm that strips words to their stem, and disregards diacritics and case (uppercase/lowercase).

the morph parameter
setting morph = true looks for all inflected forms (as well as headwords) contained both in KD data and in the external morphological lists.

For example: /search?source=global&language=en&text=houses&morph=true
searching “houses” will return the entry “house” (noun) even though the word “houses” is not an entry in the English dictionary (it is a plural inflection of “house”).

the analyzed parameter
setting analyzed = true looks for inflected forms by applying the stemmer.

For example: /search?source=global&language=en&text=working&analyzed=true
This query returns the entries “working” (adj.), “work” (verb), “work” (noun), “hard-working” (adjective), “working class” (noun), “work on” (verb) and any other entry with the stem “work” in its headword.

The stemmer also disregards diacritics and vocalization (for example in Hebrew and Arabic) and removes case-sensitivity (uppercase/lowercase).

GET /entries, GET /senses - searching by entry (or sense) ID
When searching by parameters (as shown previously), each entry result contains a unique entry ID, and each sense of an entry has its own unique sense ID. Using these IDs, it is possible to obtain more data – various syntactic and semantic information, compositional phrases, usage examples, translations and more – of a single entry (or sense). The entries collection groups together all entries from all different resources (Global, Password, Random House).

The result JSON object contains the field id, source, language, version, related_entries, headword and senses. Following is a brief explanation regarding each field.

  • id (string) - the unique dictionary entry ID
  • source (string) - the K Dictionaries resource from which the entry is taken (Global, Password, Random House)
  • language (string) - a two-character string that is the language code (for a list of all language codes, query GET/languages)
  • version (number) - the version of the dictionary the entry is taken from
  • related entries (array of strings) - an array containing the IDs of the related entries
  • headword (object/array of objects) - contains extensive syntactic and phonetic information of the headword
  • senses (array of objects) - contains an elaborate disambiguation of the headword into senses, including syntactic, phonetic and semantic information

some examples:

/entries/EN_DE00000789
This query returns the complete entry “bank” in the Spanish core of the Global series.

/entries/PW00003877
This query returns the complete entry “chair” in the Password series.

/entries/RDE00064769_0
This query returns the complete entry “smile” in the Random House Webster’s college dictionary.

you can also search for a specific sense by its unique sense ID. The JSON result for this type of query includes: id (sense id), source, language and entry (entry id).
For example: /senses/EN_SE00001278
This query returns the second sense of the polysemous entry “bank”.

STRUCTURE
Following is a detailed schema of the different elements constituting a complete entry JSON object, divided by type. Note that some elements can be of more than one type.

Headword Object
Strings: text, pos, subcategorization, gender, case, register, number, geographical_usage, mood, tense
Numbers: homograph_number
Arrays: tense, mood, geographical_usage, register, case, subcategorization (arrays of strings), inflections (array of objects)
Objects: alternative_scripts, pronunciation

Sense Object (within the Senses array)
Strings: id, definition, semantic _category, register, range_of_application, subcategorization, geographical_usage, semantic_subcategory, sentiment, see, see_also
Arrays: semantic_category, register, sentiment, geographical_usage, range_of_application, subcategorization, synonyms, antonyms, semantic_subcategory, see_also (arrays of strings), examples, compositional_phrases, inflections, senses (array of objects)
Objects: translations

Compositional Phrases Object (within the Compositional Phrases array)
Strings: text, definition, sentiment, register, semantic_category, semantic_subcategory, range_of_application, aspect, pos, geographical_usage
Arrays: synonyms, antonyms, senses, sentiment, register, semantic_category, semantic_subcategory, range_of_application, geographical_usage (arrays of strings), examples (array of objects)
Objects: alternative_scripts, translations

Examples Object (within the Examples array)
Strings: text
Objects: alternative_scripts, translations

Translations Object
field = language code (2 letters) – value is an object (or an array of objects for more than one translation) with the following fields:

Strings: text, range_of_application, collocate, register, semantic_category, semantic_subcategory, sentiment, gender, number, geographical_usage, pos
Arrays: range_of_application, collocate, register, semantic_category, semantic_subcategory, sentiment, geographical_usage (arrays of strings), inflections, pronunciation (array of objects)
Objects: alternative_scripts, pronunciation

Inflections Object (within the Inflections array)
Strings: text, geographical_usage, case, number, gender, register, tense, aspect, subcategorization, mood
Arrays: geographical_usage, case, register, tense, subcategorization, mood (arrays of strings), pronunciation (array of objects)
Objects: alternative_scripts, pronunciation

Pronunciation Object
fields: value (string) - the pronunciation text, geographical_usage (string/array of strings)

Alternative Scripts Object
field: the name of the alternative script with a string value containing the text

Followers: 20
Resources:
Product Website Terms of use
API Creator:
Rapid account: Lexicala
Lexicala
kdictionaries
Log In to Rate API
Rating: 3.7 - Votes: 3