Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Help me about Examples.java, Thanks a lot!

Help
Chen Liu
2008-01-18
2013-04-29
  • Chen Liu
    Chen Liu
    2008-01-18

    Hi, everybody,
    I have a problem during running the Examples.java. When I run it, there is a problem:
    2008-1-19 0:47:53 net.didion.jwnl.util.MessageLog doLog
    信息: Installing dictionary net.didion.jwnl.dictionary.FileBackedDictionary@14fe5c
    Base form for "running-away": [IndexWord: [Lemma: run away] [POS: verb]]
    java.lang.NullPointerException
        at net.didion.jwnl.data.PointerTarget.getPointers(PointerTarget.java:39)
        at net.didion.jwnl.data.PointerTarget.getTargets(PointerTarget.java:53)
        at net.didion.jwnl.data.SynsetProxy.getTargets(SynsetProxy.java:47)
        at net.didion.jwnl.data.PointerUtils.getPointerTargets(PointerUtils.java:412)
        at net.didion.jwnl.data.PointerUtils.getDirectHypernyms(PointerUtils.java:39)
        at net.didion.jwnl.utilities.Examples.demonstrateListOperation(Examples.java:87)
        at net.didion.jwnl.utilities.Examples.go(Examples.java:70)
        at net.didion.jwnl.utilities.Examples.main(Examples.java:46)

    Who knows why? pls contact me! I am very urgent! Thanks!

    my msn:bisal1130@yahoo.com.cn
    emails:bill1130@gmail.com

     
    • Brett Walenz
      Brett Walenz
      2008-01-18

      I tested this on the latest release, and it worked, so can you provide me with more information?

      Are you using WordNet 2.0, or another version?

      Similarly, are you using the file_properties.xml that has been bundled with the release, or another one?

      I'll keep looking into this.

       
    • Chen Liu
      Chen Liu
      2008-01-19

      Hi,bwalenz,
      I used Wordnet2.0, jwnl13rc1 and the file_properties.xml in which I only changed the directory path of my dictionary. I added an argument "E:\Eclipse3.2\workspace\Wordnet\file_properties.xml" during running the code, but it always prints:

      2008-1-19 14:02:52 net.didion.jwnl.util.MessageLog doLog
      信息: Installing dictionary net.didion.jwnl.dictionary.FileBackedDictionary@47858e
      Base form for "running-away": [IndexWord: [Lemma: run away] [POS: verb]]
      java.lang.NullPointerException
          at net.didion.jwnl.data.PointerTarget.getPointers(PointerTarget.java:39)
          at net.didion.jwnl.data.PointerTarget.getTargets(PointerTarget.java:53)
          at net.didion.jwnl.data.SynsetProxy.getTargets(SynsetProxy.java:47)
          at net.didion.jwnl.data.PointerUtils.getPointerTargets(PointerUtils.java:412)
          at net.didion.jwnl.data.PointerUtils.getDirectHypernyms(PointerUtils.java:39)
          at net.didion.jwnl.utilities.Examples.demonstrateListOperation(Examples.java:87)
          at net.didion.jwnl.utilities.Examples.go(Examples.java:70)
          at net.didion.jwnl.utilities.Examples.main(Examples.java:46)

      if the information here is not enough, could you contact me using msn? May be that is convenient for communication. Thanks a lot again!

       
    • Chen Liu
      Chen Liu
      2008-01-19

      Oh, I have figured it out! I changed jwnl13rc1 into jwnl13rc3 and the code ran well. But I don't know the differences between jwnl13rc1 and jwnl13rc3. In addition, I don't put the JWNLResource_en.properties in the directory path but the code also may run well. Wheteher the code don't need that file if we use jwnl13rc3? Anyway, the code run. However, I don't know well enough about how I can make a query expansion through the jwnl? And the biggest problem for me is that:

          if I input a keyword(such as computer), I wanna give a synset from the jwnl which may enrich my query string so that I can do the next work further. But how I can give the keywords generated by jwnl(such as micro-computer,calculator, reckoner, figurer, estimator) and transfer them into another program?
       
          I am urgent to give some advice or help! Pls! Thanks a lot!