Hi...About the JWNL

  • Anonymous - 2002-02-15

    Hi maly,

    I am currently working on it,too.

    First,for your question,I trace the scource code.
    If you notice the initialize() in JWNL, you will find it need a FileInputStream point to the XML file . Otherwize,it's null and you got that exception.

    And I am trying to put the properties file into the right position.(Seems some constants are defined in these file) If you have any ideas,please contact me...:-)

    Guan Da Chang
    National Taiwan University.

    • M. Alyahya

      M. Alyahya - 2002-02-15

      Thanks for your advice, it really worked and I don't see the error anymore. About the properties files, as far as I know you should have a file_properties.xml file and a jwnl_properties.dtd file in your jwnl directory. You should update the file_properties.xml file according to the comments metioned in <jwnl path>\doc\property file configuration file.

      I hope this will help, and let me know how it goes.


      • Anonymous - 2002-02-16


        I still got Exception while I try to run JWNL.initialize(InputStream):

        It seems that the XML file are correctly parsed.The probelm is the program can not resolve the NUMBER_OF_VERB_FRAMES parameter defined in JWNLResource_en.properties. I try  to put this file in to the <jre>/lib,but it does not work.

        So the question is,how JWNL use the Resource boundle.I will try to solve this.And could you post your xml file?

    • M. Alyahya

      M. Alyahya - 2002-02-16

      Hi  shm,

      Well my file_properties.xml file looks like this:

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jwnl_properties SYSTEM "file:///c:\jwnl\jwnl_properties.dtd">

      <jwnl_properties language="en">
          <version publisher="Princeton" number="1.6" path="c:\wn16\dict" language="en"/>
          <dictionary class="net.didion.jwnl.dictionary.FileBackedDictionary">
              <param name="morphological_processor" value="net.didion.jwnl.dictionary.DefaultMorphologicalProcessor"/>
              <param name="file_manager" value="net.didion.jwnl.dictionary.file_manager.FileManagerImpl">
                  <param name="file_type" value="net.didion.jwnl.princeton.file.PrincetonWordNetRandomAccessDictionaryFile"/>
          <dictionary_element_factory class="net.didion.jwnl.princeton.data.PrincetonWordNet_1_6_DictionaryElementFactory"/>
          <resource class="PrincetonResource"/>

      and the jwnl_properties.dtd looks like this:

      <?xml version='1.0' encoding='UTF-8' ?>

      <!ELEMENT jwnl_properties (dictionary , version , dictionary_element_factory , resource*)>
      <!ATTLIST jwnl_properties language  CDATA  #IMPLIED
                                country   CDATA  #IMPLIED >

      <!ELEMENT dictionary (param*)>
      <!ATTLIST dictionary  class CDATA  #IMPLIED >

      <!ELEMENT param (param*)>
      <!ATTLIST param  name  CDATA  #IMPLIED
                       value CDATA  #IMPLIED >

      <!ELEMENT version EMPTY>
      <!ATTLIST version  publisher CDATA  #IMPLIED
                         number    CDATA  #IMPLIED
                         language  CDATA  #IMPLIED
                         country     CDATA  #IMPLIED
                         path      CDATA  #IMPLIED >

      <!ELEMENT dictionary_element_factory (param*)>
      <!ATTLIST dictionary_element_factory  class CDATA  #IMPLIED >

      <!ELEMENT resource EMPTY>
      <!ATTLIST resource  class CDATA  #IMPLIED >

      Hope this might be helpful and best of luck.

    • Anonymous - 2002-02-26

      I am getting the same as described by Guan DaChang i.e I still got Exception while I try to run JWNL.initialize(InputStream):

      How do I avoid this ? I am using java in Debian Linux .



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks