Natural Language Processing Centre provides several APIs for different language services.
You can call the API via GET requests. See examples in the service description.
Required parameters: call=service name, text=text
Optional parameters: output=output (text/JSON applicable only for some services), lang=language (applicable only for some services)
Service-specific parameters: see service description
If output is set to json, returns always a JSON object. See example calls to check the object structure. If output set to text, outputs a text. The default format is text for most services.
You can call the API once a second maximum from one IP address.
The daily limit is set to 500 calls.
service name | description | parameters | returns | example call | text length limit |
---|---|---|---|---|---|
sholva Shallow ontology for Czech words | This service returns negative or positive membership of the word in the following classes: person, person-individual, event, substance. | service.py?call=sholva&lang=cs&output=json&text=šampaňské | 1000 | ||
topics Get topics of a text | This service returns a list of topics found in a short text. The topic candidates are noun phrases ordered by importance. | service.py?call=topics&lang=cs&output=json&text=Jednoho letního večera na návsi pod starou lípou hostinský Antonín Kučera vyvalil soudeček s pípou, nebylo to posvícení, nebyla to neděle, v naší obci mezi kopci plnily se korbele. Byl to ten slavný den, kdy k nám byl zaveden elektrický proud, Byl to ten slavný den, kdy k nám byl zaveden elektrický proud, střídavý, střídavý, silný elektrický proud, střídavý, střídavý, zkrátka elektrický proud. | 1000 | ||
phrases Extract (sub)phrases | This service processes an input sentence and returns all phrases identified in the text (and their tags). | service.py?call=phrases&lang=cs&output=json&text=Konečně levný mobil - nástupce kompaktního modelu má být velkým lákadlem | 1000 | ||
vocative Get vocative for a name | This service returns vocative case for a name plus gender if possible. | service.py?call=vocative&lang=cs&output=json&text=Jan Petr Obr | 200 | ||
gen Word forms generator | For the input word (lemma, base form) returns all inflected forms with tags (tagset reference is here or here) | service.py?call=gen&lang=cs&output=json&text=slovo | 40 | ||
majka Morphological analysis of words | This service returns all lemmata and morphological tags for each of the input words (comma separated). | service.py?call=majka&lang=cs&output=json&text=cestou,jedem | 1000 | ||
declension Declension of noun phrases | This service returns a the input phrase in a different case and/or number. | service.py?call=declension&lang=cs&output=json&text=velký růžový slon&c1=c1&c2=c4&n=nP | 500 | ||
diacritics Get string with diacritics added | This service returns the phrase with the most probable diacritics added. | service.py?call=diacritics&lang=cs&output=json&text=dama v treti rade | 1000 | ||
polite Get politeness service | This service returns politeness level of texts. | service.py?call=polite&lang=cs&output=json&text=Tento text obsahuje nepěkné slovo kretén. | 1000 | ||
get_location Get location service | This service returns a list of locations incl. nominatives contained in the text. | service.py?call=get_location&lang=cs&output=json&text=V létě pojedeme do New Yorku, Paříže a Loučné nad Desnou. | 1000 | ||
logic Intensional logical analysis | This service processes an input sentence and returns logical construction in Transparent Intensional Logic of the first possible syntactic tree. | service.py?call=logic&lang=cs&output=json&text=Ministr dopravy ČR navštívil Ostravsko. | 1000 | ||
tagger Get lemmata and tags for tokens | This service splits the text into sentences, split the sentences into tokens, and determines lemma and tag for each token. | service.py?call=tagger&lang=cs&output=json&text=Na okně seděla kočka, byl krásný letní den. Na okně seděla kočka a koukala se ven. | 100000 | ||
inflection Inflection of words | This service returns all input words in the specified form (comma separated list of tag-values). | service.py?call=inflection&lang=cs&output=json&text=cesta,jed&tag=c7,nS | 1000 | ||
hello Hello Service | This service returns a greeting. It's practically useless since it is only an example. | service.py?call=hello&lang=en&output=json&text=Dolly | 40 |
All services are provided under the NLP Centre Web Service Licence.