Database Dictionary

Help
2003-12-30
2004-01-13
  • 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.

                Jose

     

    • Anonymous
      2003-12-30

      If you use Java to access the database, you can use synchronize(common_obj) {
         and here query the database
      }
      Similar to jwnl1.3 in
      didion\jwnl\dictionary\file_manager\FileManagerImpl.java
      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 ftp.cogsci.princeton.edu).

       
      • 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(DatabaseBackedDictionary.java:132)
                at net.didion.jwnl.data.IndexWord.loadSynset(IndexWord.java:107)
                at net.didion.jwnl.data.IndexWord.getSenses(IndexWord.java:93)
                at WORDNET.GetTermInformation.getSynHypHyperLemaNoun(GetTermInformation.java:305)
                at WORDNET.GetTermInformation.getInformationTerm(GetTermInformation.java:88)
                at WORDNET.WS.SynonymsWebServiceBean.getConceptInfo(SynonymsWebServiceBean.java:389)
                at WORDNET.WS.SynonymsWebServiceBean.main(SynonymsWebServiceBean.java:399)
        Caused by: java.sql.SQLException: Illegal operation on empty result set
                at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:3617)
                at com.mysql.jdbc.ResultSet.getString(ResultSet.java:1772)
                at com.mysql.jdbc.ResultSet.getBoolean(ResultSet.java:612)
                at net.didion.jwnl.princeton.data.AbstractPrincetonDatabaseDictionaryElementFactory.createSynset(AbstractPrincetonDatabaseDictionaryElementFactory.java:42)
                at net.didion.jwnl.dictionary.DatabaseBackedDictionary.getSynsetAt(DatabaseBackedDictionary.java:126)
                ... 6 more

         

    • Anonymous
      2004-01-02

      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
      2004-01-13

      Please enter a bug for this...