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.
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.
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?
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">
<version publisher="Princeton" number="1.6" path="c:\wn16\dict" language="en"/>
<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"/>
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.
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.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.