ELEXIS Protocol for accessing dictionaries (1.0)

Download OpenAPI specification:Download

This protocol allows data to be shared with the ELEXIS platform and should be implemented by all providers of data to the ELEXIS platform. This is an OpenAPI documentation, for more details about using this specification, please refer to OpenAPI documentations: https://swagger.io/resources/articles/documenting-apis-with-swagger/

Get dictionaries

List all of the dictionaries that are available at this endpoint

Responses

200

Success

500

Internal Server Error

get /dictionaries
/dictionaries

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "dictionaries":
    [
    ]
}

About the dictionary

Get the metadata about the dictionary, including the conditions under which it can be included in the Dictionary Matrix

path Parameters
dictionary
required
string

Identifier of the dictionary to describe

Responses

200

Success

404

Dictionary not found (identifier not known)

500

Internal Server Error

get /about/{dictionary}
/about/{dictionary}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "release": "PUBLIC",
  • "sourceLanguage": "en",
  • "targetLanguage":
    [
    ],
  • "genre":
    [
    ],
  • "title": "The Human-Readable Name of this resource",
  • "creator":
    [
    ],
  • "publisher":
    [
    ]
}

Get all lemmas

Get all of the entries contained within this dictionary

path Parameters
dictionary
required
string

The identifier of the dictionary to list

query Parameters
limit
integer >= 1

The maximum number of entries to return

offset
integer >= 0
Default: 0

The offset (index of first entry) to return

Responses

200

The entries matching with this lemma

404

Dictionary not found (identifier not known)

500

Internal Server Error

get /list/{dictionary}
/list/{dictionary}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Headword lookup

Given a headword, find all the entries that are listed under this headword

path Parameters
dictionary
required
string

The identifier of the dictionary containing the entries

lemma
required
string

The lemma of the headword to lookup

query Parameters
partOfSpeech
string
Enum: "ADJ" "ADP" "ADV" "AUX" "CCONJ" "DET" "INTJ" "NOUN" "NUM" "PART" "PRON" "PROPN" "PUNCT" "SCONJ" "SYM" "VERB" "X"

A part of speech tag that the entry has, this must be one of the value from the Universal Part-of-Speech Tagset (http://universaldependencies.org/u/pos/)

limit
integer >= 1

The maximum number of entries to return

offset
integer >= 0
Default: 0

The offset (index of first entry) to return

inflected
boolean
Default: false

If true treat the query as an inflected form and return all lemmas that may be a form of this query

Responses

200

The entries matching with this query

404

Dictionary not found (identifier not known)

500

Internal Server Error

get /lemma/{dictionary}/{headword}
/lemma/{dictionary}/{headword}

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Entry as JSON

Return the Entry directly as a JSON document. Services must implement at least one of the /json, /ontolex or /tei actions.

path Parameters
dictionary
required
string

The identifier of the dictionary containing the entry

id
required
string

The identifier of the entry

Responses

200

Success

301

ID Updated (this entry has changed its ID)

404

No Entry Availble (the dictionary or entry ID is not known or the entry has been deleted)

500

Internal Server Error

get /json/{dictionary}/{id}
/json/{dictionary}/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "@type": "Word",
  • "language": "en",
  • "partOfSpeech": "commonNoun",
  • "canonicalForm":
    {
    },
  • "senses":
    [
    ]
}

Entry as Turtle

Return the dictionary entry as an RDF Turtle Document. Services must implement at least one of the /json, /tei or /ontolex actions.

path Parameters
dictionary
required
string

The dictionary containing the entry

id
required
string

Responses

200

Success

301

ID Updated (this entry has changed its ID)

404

No Entry Availble (the dictionary or entry ID is not known or the entry has been deleted)

500

Internal Server Error

get /ontolex/{dictionary}/{id}
/ontolex/{dictionary}/{id}

Response samples

Content type
text/turtle
Copy
@prefix ontolex: @prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#> .
@prefix lexinfo: <http://lexinfo.net/ontology/3.0/lexinfo/>.
@prefix skos: <http://www.w3.org/2004/02/skos/core# >

<> a ontolex:LexicalEntry
  ontolex:canonicalForm [
  ontolex:writtenRep "example"@en ] ;
  lexinfo:partOfSpeech lexinfo:commonNoun ;
  ontolex:denotes [
    skos:definition "An example OntoLex Entry"@en ] .

Entry XML

Return the TEI-Lex0 representation of the document. Services must implement at least one of the /ontolex, /json or /tei actions.

path Parameters
dictionary
required
string

The dictionary containing the entry

id
required
string

Responses

200

Success

301

ID Updated (this entry has changed its ID)

404

No Entry Availble (the dictionary or entry ID is not known or the entry has been deleted)

500

Internal Server Error

get /tei/{dictionary}/{id}
/tei/{dictionary}/{id}

Response samples

Content type
text/xml
Copy
<entry xml:id="id">
  <form type="lemma"><orth>example</orth></form>
  <gramGrp>
    <pos norm="NN">noun</pos>
  </gramGrp>
  <sense n="1">
    <def>An example TEI-Lex0 Entry</def>
  </sense>
</entry>