Database Dictionary

  • Hi,

    I have been using wordNet with a Map Dictionary but I like to use a database to access concurrently.

    Therefore my question is:

    Someone has used a database approach? How do yo make it?

    I have translated the Wordnet Dictionary to a Mysql database, but when I query it some exceptions take places.

    Thanks in advance.



    • Anonymous

      If you use Java to access the database, you can use synchronize(common_obj) {
         and here query the database
      Similar to jwnl1.3 in
      method readLineAt().
      Otherwise look into MySQL help - and search the section concurency queries(does it exists?)

      Please tell me - how did you use Map Dictionary with jwnl(1.3 or other) and WordNet2.0,
      considering that you must use the file map_properties.xml which points to a non-existing file: c:\program files\wordnet\2.0\dict\serialized ?
      I have checked that wordnet\2.0\dict\serialized is not brought by wordnet 2.0 installation kit(WordNet-2.0_win.exe from

      • Hi,

        First i build the map dictionary with the DictionaryToMap utility. Second you only need to use the JWNL 1.3 API.

        The comand line used to build the MapDictionary is at the documentation directory in utilities/DictionaryToMap.txt. file.

        To create de database I use the DictonaryToDatabase utility and to read it I use the JWNL 1.3 API. I have read it that it is the same if you use a MapDictionary or a Database Dictionary. Whe I follow this approach I can query the database but when I ask for the synonyms of a term  I obtain the next exception

        net.didion.jwnl.JWNLException: Error while accessing database
                at net.didion.jwnl.dictionary.DatabaseBackedDictionary.getSynsetAt(
                at WORDNET.GetTermInformation.getSynHypHyperLemaNoun(
                at WORDNET.GetTermInformation.getInformationTerm(
                at WORDNET.WS.SynonymsWebServiceBean.getConceptInfo(
                at WORDNET.WS.SynonymsWebServiceBean.main(
        Caused by: java.sql.SQLException: Illegal operation on empty result set
                at com.mysql.jdbc.ResultSet.checkRowPos(
                at com.mysql.jdbc.ResultSet.getString(
                at com.mysql.jdbc.ResultSet.getBoolean(
                at net.didion.jwnl.dictionary.DatabaseBackedDictionary.getSynsetAt(
                ... 6 more


    • Anonymous

      I don't know how much this helps,
      but here are some valid offsets that you can try in unsing - getSynsetAt(). This offsets are the same for map dictionary and file dictionary:
      1740 2056 2342 2452 2560 2645 3009
      Offset 1740 is for "entity" synset.

    • John Didion
      John Didion

      Please enter a bug for this...