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

NUMBER_OF_VERB_FRAMES-bug workaround

Help
thomas
2005-04-19
2013-04-29
  • thomas
    thomas
    2005-04-19

    Hi,

    I am trying to set up jwnl, but cannot get ride of the NUMBER_OF_VERB_FRAMES bug (?).

    Tried version 1.3RC1 to 1.3RC3.
    Tried compiling the source code myself.
    Tried WordNet versions 1.7, 1.7.1, 2.0, 2.1.

    Can I set the framesSize in VerbFrame.initialize() to a default value like 1?
    Have I to set a value in the properties file?

    I have modified the file_properties.xml file for dictionary version and path to dictionary like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <jwnl_properties language="en">
        <version publisher="Princeton" number="2.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:\data\develop\extern\WordNet-2.0\dict"/>
            </param>
        </dictionary>
        <resource class="PrincetonResource"/>
    </jwnl_properties>

    Now, I tried to use version 1.2, but using WordNet other than 1.7.1 causes a
    "Unable to install net.didion.jwnl.dictionary.FileBackedDictionary"

    Using version 1.7.1 results in a parse exception for parsing a double.
    Is there any help for setting up the old version?
    I have not tried to compile the 1.2 source code, would this help?

    Thank you!

     
    • thomas
      thomas
      2005-04-20

      Hi,

      found the solution myself:
      o Use WordNet 2.0 dictionary for your actual OS, i.e. do not use unix version for windows.
      o Use the binary distribution, do NOT compile the source

      This seems to work for me.

       
    • se_webster
      se_webster
      2005-09-22

      I think you'll find you are missing the JWNLResource_en.properties file you can find one in the jwnl.jar (thats why your bin version works...) extract it to the top layer of your package. (You will also find a good Examples.java in there which is quite useful...)

      You will need to do additional changes to get 2.1 working (see my post getting 2.1 working)

      Steve

       
  • ashraf soliman
    ashraf soliman
    2010-09-03

    Hello krekeler

    <param name="dictionary_path" value="C:\data\develop\extern\WordNet-2.0\dict"/>

    You have to assure that this path is modified in both file_properties.xml and map_properties.xml. Moreover if you want to store the dictionary in database you have to adjust database_properties.xml in the line of;

    <param name="url" value="jdbc:mysql://localhost:3306/jwnl?user=root"/>

    in the value attribute write your proper connection

    and write the following code in main function (notice that I use netbean):

            String sProjectPath = System.getProperty("user.dir");
            String sPropertyFile= sProjectPath + "\\jwnl14-rc2\\config\\file_properties.xml";
            String sCreateTableScript = sProjectPath + "\\jwnl14-rc2\\sql\\create.sql";
            String sDriverClass="com.mysql.jdbc.Driver";
            String sConnectionURL="jdbc:mysql://localhost:3306/jwnl?user='root'";

            String mainargs = new String;
            mainargs = sPropertyFile;
            mainargs = sCreateTableScript;
            mainargs = sDriverClass;
            mainargs = sConnectionURL;

            DictionaryToDatabase.main(mainargs) ;

     
  • Fiona
    Fiona
    2011-11-26

    @ vblighteg

    I realise that I am bumping a dead thread, but I have followed your instructions on how to get jwnl set up, and I get multiple errors when it tries to start the database connection.

    The main error is

    Caused by: java.lang.RuntimeException: Can't load resource bundle due to underlying exception java.util.MissingResourceException: Can't find bundle for base name com.mysql.jdbc.LocalizedErrorMessages, locale en_GB
    

    I downloaded the msql java connector jar file to get the Driver, i assumed this was the way to go. I'm not sure if it is this which is causing this error.

    I'm unsure where to go from here

     
  • Fiona
    Fiona
    2011-11-26

    ok, managed to solve that error.

    now it's a simple ClassNotFound with com.msql.jdbc.Driver

    I have put the jar file in the netbeans IDE library, as well as in the jre/lib and jre/lib/ext, but the problem persists