Access via the API
Numerous entries from this website can be directly queried via the HTTP-interface. Direct search of synonyms, similar words and substring matches is supported. Querrying through Wikipedia/Wiktionary is currently not supported.
Warning: output format might change. However, it will only be extended, existing parts will not be changed without notice.
Query
The following HTTP-query over GET finds all synsets including the word query.
http://spell.linux.sk/thesaurus/xml_api.php?q=query&format=text/xml
Result
Query result is an XML file in the form:
<matches> <metaData> <apiVersion content='0.1.3'/> <warning content='WARNING -- this API is in beta -- the format may change without warning!'/> <copyright content='Copyright (c) 2004-2024 Zdenko Podobný, zdposter (at) gmail (dot) com;(c) 2004 Tibor Bako, yorik (at) szm (dot) sk'/> <license content='GNU General Public License (GPL)'/> <source content='http://spell.linux.sk/thesaurus/'/> <date content='Sat, 21 Dec 2024 17:05:15 +0000'/> </metaData> <synset id='1234'> <categories> <category name='Category name'/> </categories> <term term='Meaning 1, word 1'/> <term term='Meaning 1, word 2'/> </synset> <synset id='2345'> <categories/> <term term='Meaning 2, word 1'/> </synset> </matches>
Options
- format=text/xml: query result will be returned in XML format. Other possible output formats currently aren't supported.
- similar=true: every query returns up to five similar terms. This is useful for offering suggestions to users in case of typing errors etc. Query example:
http://spell.linux.sk/thesaurus/xml_api.php?q=query&format=text/xml&similar=true
Output (excerpt):<similarterms> <term term="Similar term 1" distance="1"/> <term term="Similar term 2" distance="2"/> <term term="Similar term 3" distance="2"/> <term term="Similar term 4" distance="2"/>\n</similarterms>
distance returns the Levenshtein distance to the search string (words in brackets are ignored). Words are sorted according to this parameter. Only words available in the OpenThesaurus are returned. This function is thus not intended for forming spell-check suggestions. - substring=true: every query returns up to ten hits including the search word as its substring. Query example:\n
http://spell.linux.sk/thesaurus/xml_api.php?q=query&format=text/xml&substring=true
Output (excerpt):<substringterms> <term term='Substring term 1'/> <term term='Substring term 2'/> <term term='Substring term 3'/> <term term='Substring term 4'/> </substringterms>
- substringFromResults defines with which hit the output of substring matches should start (offset from first hit). Works only with substring=true. Default value is 0, so it starts with the first hit.
- substringMaxResults defines the highest number of returned substring hits. Works only with substring=true. Default value is 10, highest value is 250.
- mode=all: activates all available additional queries. Currently these are similar=true and substring=true.
Known Issues
- In the query, letters with umlauts are treated as letters without umlauts, so word tur also finds Tür and vice versa.
Downloads
Besides direct querying full database downloads are also still available.
Page updated: 2024-02-06