JWNL 1.4: Unix support?

  • Mark Ferguson

    Mark Ferguson - 2008-01-23


    I am trying out the just-released JWNL 1.4, which professes support for WordNet 3.0. When trying to run with a FileBackedDictionary, I am getting the following exception:

    Caused by: java.io.FileNotFoundException: /srv/wordnet-3.0/dict\sense.idx (No such file or directory)

    I found online that sense.idx is the name in the Windows version of WordNet, while index.sense is used for the Unix version. I was wondering if there is a patch in the works to offer support for WordNet 3.0 for Unix?

    I find this problem curious since WordNet 3.0 isn't even released for Windows, yet JWNL 1.4 says it supports 3.0 -- but only for the Windows version! In any case, thanks for all the great work you've done on this library, I think it's fantastic.


    • Mark Ferguson

      Mark Ferguson - 2008-01-23


      After poking around in the code, I discovered the problem: file_properties.xml was set to version 2.0 of the database. Changing it to 3.0 fixed it. I see that that the version stuff is documented in the Dev Guide. However this was a pretty obscure error message for the problem and I would have had a hard time finding it if I hadn't looked through the source!

      Now I have another problem, however: it doesn't like the backslash being used as the path separator, so it can't find the file. I will recompile the library using System.getProperty("path.separator") instead, you should too!


    • Mark Ferguson

      Mark Ferguson - 2008-01-23

      (I did mean file.separator -- everything works now, so this seems to be the only Unix-related problem)

    • Brett Walenz

      Brett Walenz - 2008-01-25

      Thanks for the feedback. Documentation is always an issue, and that particular issue is problematic since the WordNet file system has changed quite a bit. I'm glad you solved the first issue and will correct the file.separator issues.

      And just a note for WordNet 3.0 - while it's not released for Windows yet, the dictionary stays the same regardless of which system environment you are running under now, it's their UI that isn't finished yet.


    • Anonymous - 2008-01-30


      I tried the new JWNL release with WordNet 3 both on a Mac and on a Windows desktop. It works without problems on the Mac (thanks!) but on my Windows desktop I get an Exception "The properties file must specify a dictionary path".

      I assume that it doesn't like the dictionary from the Unix version of WordNet, but you say the Unix/Windows dictionaries are now the same? How can use JWNL with the WN3 dictionary under Windows?

      Thanks for your help!


    • Laura Perez

      Laura Perez - 2008-03-05

      Dear All,

      I have the same problems as Mark does, now the problem with the path separator. I am trying to recompile the library as he suggested in the previous email. But after downloading the source code and looking for the place where to make the change I've just found this in FileManagerImpl.java:

            String sense = System.getProperty("file.separator") + "index.sense";
              if (JWNL.getVersion().getNumber() < 2.1) {
                  sense = System.getProperty("file.separator") + "sense.idx";

      which seems to be correct??!! I've download today (march-05-2008) from sourceforge svn repository.
      Moreover, I should get the mysql-connector-java-5.1.5-bin.jar library in order to be able to proceed with the re-compilation, right?

      Of course, if you have some corrections or suggestions done, they will be highly appreciated.

      Laura Perez

  • Tomas Kliegr

    Tomas Kliegr - 2011-01-08

    I was getting the same exception while making  JWNL 1.4 RC2 work on Linux with WN 2.0.  The fix is as follows:
    in FileManagerImpl.java comment out lines 74 - 77, like this
            if (JWNL.getVersion().getNumber() < 2.0) {
                sense = System.getProperty("file.separator") + "sense.idx";

    I checked and in unix Wordnet version 1.7 - 2.0: the sense.idx file does not exist, but there is the originally expected file index.sense.


Log in to post a comment.