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

NO_OF_VERB_FRAMES Exception

Help
Ankur
2008-01-18
2013-04-29
  • Ankur
    Ankur
    2008-01-18

    I was trying to use JWNL1.3 source for a project in word net. I used Eclipse and created a project from existing source.
    While compiling Examples.java given with the source I got the following error:

    java.lang.NumberFormatException: For input string: "NUMBER_OF_VERB_FRAMES"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at net.didion.jwnl.data.VerbFrame.initialize(VerbFrame.java:22)
        at net.didion.jwnl.JWNL.initialize(JWNL.java:131)
        at Examples.main(Examples.java:38)

    Is there some probelm with my properties xml file. I used the same file as supplied by jwnl1.2.1 and changed the version number to 2.0

    Please help me out with this.

    My file_properties.xml file read like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <jwnl_properties language="en">
        <version publisher="Princeton" number="3.0" language="en"/>
        <dictionary class="net.didion.jwnl.dictionary.FileBackedDictionary">
            <param name="morphological_processor" value="net.didion.jwnl.dictionary.morph.DefaultMorphologicalProcessor">
                <param name="operations">
                    <param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
                    <param value="net.didion.jwnl.dictionary.morph.DetachSuffixesOperation">
                        <param name="noun" value="|s=|ses=s|xes=x|zes=z|ches=ch|shes=sh|men=man|ies=y|"/>
                        <param name="verb" value="|s=|ies=y|es=e|es=|ed=e|ed=|ing=e|ing=|"/>
                        <param name="adjective" value="|er=|est=|er=e|est=e|"/>
                        <param name="operations">
                            <param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
                            <param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
                        </param>
                    </param>
                    <param value="net.didion.jwnl.dictionary.morph.TokenizerOperation">
                        <param name="delimiters">
                            <param value=" "/>
                            <param value="-"/>
                        </param>
                        <param name="token_operations">
                            <param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
                            <param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
                            <param value="net.didion.jwnl.dictionary.morph.DetachSuffixesOperation">
                                <param name="noun" value="|s=|ses=s|xes=x|zes=z|ches=ch|shes=sh|men=man|ies=y|"/>
                                <param name="verb" value="|s=|ies=y|es=e|es=|ed=e|ed=|ing=e|ing=|"/>
                                <param name="adjective" value="|er=|est=|er=e|est=e|"/>
                                <param name="operations">
                                    <param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
                                    <param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
                                </param>
                            </param>
                        </param>
                    </param>
                </param>
            </param>
            <param name="dictionary_element_factory" value="net.didion.jwnl.princeton.data.PrincetonWN17FileDictionaryElementFactory"/>
            <param name="file_manager" value="net.didion.jwnl.dictionary.file_manager.FileManagerImpl">
                <param name="file_type" value="net.didion.jwnl.princeton.file.PrincetonRandomAccessDictionaryFile"/>
                <param name="dictionary_path" value="c:\program files\wordnet\2.0\dict"/>
            </param>
        </dictionary>
        <resource class="PrincetonResource"/>
    </jwnl_properties>

     
    • Chen Liu
      Chen Liu
      2008-01-18

      You can unzip another property file from jwnl.jar. Its name is "JWNLResource_en.properties". Put it in the package directory.
      Besides that, 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

      Yes, it is probably as mentioned above, you may need the newer JWNLResource_en.properties file.

      I would assume the properties file has changed from 1.2.1 to 1.3 release.

       
    • Chen Liu
      Chen Liu
      2008-01-19

      Another solution:
         You can change the jwnl13rc1 into jwnl13rc3 and the code may run well.