Skip to content

Python API

jyckle edited this page Dec 3, 2018 · 1 revision

Methods to Receive Data

POST /language-list

Description: Get a list of languages

Request Payload Example

{}

Response Payload Example

{
  "languages": [English, Spanish]
}

POST /paradigm-list

Description: Get the full list of paradigms for a given language

Request Payload Example

{
  "language_name": "English"
}

Response Payload Example

{
  "paradigms": [noun1, verb1, noun2, verb2]
}

POST /root-word-list

Description: Get all roots of a specified paradigm

Request Payload Example

{
  "paradigm_name": Verb
}

Response Payload Example

{
  "roots": [run, jump, crawl]
}

POST /word-form-list

Description: Get all word forms of a specified root

Request Payload Example

{
  "paradigm_root": run
}

Response Payload Example

{
  "word_data": {root: run, plural: runs, continuous: running}
}

POST /paradigm-slots

Description: Get all standard slots of a specified paradigm

Request Payload Example

{
  "paradigm_name": verb
}

Response Payload Example

{
  "paradigm_slots": {root, plural, continuous}
}

Methods to Save Data


POST /add-language

Description: Add a new language

Request Payload Example

{
  "language_name": English
}

Response Payload Example

OK or error

POST /add-paradigm

Description: Add a new paradigm

Request Payload Example

{
  "paradigm_name": English,
  "slots": [root, past, present, future]
}

Response Payload Example

OK or error

POST /add-paradigm-words

Description: Add a new set of words to a paradigm

Request Payload Example

{
  "root_word": run,
  "words": [runs, running, ran]
}

Response Payload Example

OK or error