wiki:WordNetApi
close Warning: Can't synchronize with repository "(default)" (/usr/local/svn/deb2-client does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 5 (modified by Adam, 18 years ago) (diff)

--

API for Wordnet/Cornetto? server

Replace servername with actual address of the server.

Getting the list of available dictionaries for the user

Request: servername/doc?action=init

Response: JSON encoded hash with following structure

{
  "slovniky" => {
    ''client_package_id'' => {
      "id"    => ''client package id'',
      "dict"  => ''dictionary code'',
      "prava" => ''access rights r/w'',
      "nazov" => ''package name'',
      "dicslookup" => ''array of package names to allow lookups to'',
      "eqtags" => ''array of eqtags+dictionaries'',
      "dicsreload" => ''array of dictionaries to refresh'',
      "key" => ''dictionary key tag''
    }
  }
}

Querying dictionary

Request: servername/dictionary_code?action=queryList&word=search_query

Response: JSON encoded array of hashes with following structure

 {
   "value" => ''entry ID'',
   "label" => ''information about an entry, depends on dictionary, usually contains PoS, literals''
 }