[Link Grammar] Using relex.jar?

176 views
Skip to first unread message

yO2gO

unread,
May 11, 2010, 3:42:51 PM5/11/10
to link-grammar
Hello,

I have compiled and exported relex classes with all the data files and
required libraries in a jar file using Eclipse.
When I try to use this relex.jar I get the following error


Error: Unable to initialize JWNL:java.io.FileNotFoundException: .\data
\wordnet\file_properties.xml (The system cannot find the path
specified)
Warning: Unable to initialize WordNet Java API (JWNL).
Was -Dwordnet.configfile set correctly?
Does the wordnet.configfile contain the right paths?
Will use command-line interface; this will negatively impact
performance.
Exception in thread "main" java.io.FileNotFoundException: .\data\relex-
tagging-algs.txt (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
relex.algs.AlgorithmApplier.getAlgorithmsFile(AlgorithmApplier.java:
162)
at relex.algs.AlgorithmApplier.read(AlgorithmApplier.java:79)
at relex.algs.AlgorithmApplier.<init>(AlgorithmApplier.java:53)
at
relex.algs.SentenceAlgorithmApplier.<init>(SentenceAlgorithmApplier.java:
43)
at relex.RelationExtractor.init(RelationExtractor.java:136)
at relex.RelationExtractor.<init>(RelationExtractor.java:122)
at test.AnaphoraResolution.main(AnaphoraResolution.java:27)


I have checked the paths. These files exist. I cannot figure out what
classes are looking for these files. I was thinking of hard-coding the
file names so that it will work at least.

Can someone help me with this?
Does anyone have a relex.jar that works? It would be very helpful

Thanks

--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.

Linas Vepstas

unread,
May 11, 2010, 4:26:01 PM5/11/10
to link-g...@googlegroups.com
On 11 May 2010 14:42, yO2gO <yoge...@gmail.com> wrote:
> Hello,
>
> I have compiled and exported relex classes with all the data files and
> required libraries in a jar file using Eclipse.

Try using 'ant' instead.

The build.xml file that is included with relex will place the required
algs files into the jar, where they can be found. my guess is that
your eclipse build system is failing to place this, and the other various
data files, into the jar.

I don't use eclipse, so I don't know ... am I supposed to ship
some sort of project file that eclipse users can use, so that
this kind of problem doesn't occur?

--linas

yO2gO

unread,
May 11, 2010, 9:24:31 PM5/11/10
to link-grammar
I did a build with "ant" as well. But that does not generate a jar
file.
Can you help me with this?

And for Eclipse, you don't need to ship anything. A project can be
built just from the sources.

Thanks
-Yogesh



On May 11, 4:26 pm, Linas Vepstas <linasveps...@gmail.com> wrote:

Linas Vepstas

unread,
May 12, 2010, 9:47:05 AM5/12/10
to link-g...@googlegroups.com
On 11 May 2010 20:24, yO2gO <yoge...@gmail.com> wrote:
> I did a build with "ant" as well. But that does not generate a jar
> file.
> Can you help me with this?

Try "ant help", which will list the build options.

> And for Eclipse, you don't need to ship anything. A project can be
> built just from the sources.

Well, apparently that's not true, as otherwise you wouldn't
have written your first email :-/

yO2gO

unread,
May 25, 2010, 3:35:35 PM5/25/10
to link-grammar
I keep getting this error. I have checked for all the paths.

[java] Info: Using default ./data/wordnet/file_properties.xml
[java] Error: Unable to initialize JWNL:
net.didion.jwnl.JWNLException: Una
ble to install net.didion.jwnl.dictionary.FileBackedDictionary
[java] net.didion.jwnl.JWNLException: The properties file must
specify a di
ctionary path
[java] net.didion.jwnl.JWNLException: Could not create a file
manager of ty
pe class
net.didion.jwnl.princeton.file.PrincetonRandomAccessDictionaryFile
[java] java.io.FileNotFoundException: C:\yPrograms\WordNet\dict
\verb.idx (T
he system cannot find the file specified)
[java]
[java] Warning: Unable to initialize WordNet Java API (JWNL).
[java] Was -Dwordnet.configfile set correctly?
[java] Does the wordnet.configfile contain the right paths?
[java] Will use command-line interface; this will negatively
impact per
formance.
[java] Exception in thread "main" java.lang.UnsatisfiedLinkError:
no link-g
rammar in java.library.path
[java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:
1734)
[java] at java.lang.Runtime.loadLibrary0(Runtime.java:823)
[java] at java.lang.System.loadLibrary(System.java:1028)
[java] at
org.linkgrammar.LinkGrammar.<clinit>(LinkGrammar.java:38)
[java] at relex.parser.LocalLGParser.init(LocalLGParser.java:
49)
[java] at relex.parser.LocalLGParser.parse(LocalLGParser.java:
63)
[java] at
relex.RelationExtractor.parseSentence(RelationExtractor.java:
313)
[java] at
relex.RelationExtractor.processSentence(RelationExtractor.jav
a:233)
[java] at
relex.RelationExtractor.processSentence(RelationExtractor.jav
a:217)
[java] at
relex.test.TestStanford.test_sentence(TestStanford.java:63)
[java] at relex.test.TestStanford.main(TestStanford.java:131)


What is going wrong? I have used 'ant' in this case


On May 12, 9:47 am, Linas Vepstas <linasveps...@gmail.com> wrote:

Murilo Saraiva de Queiroz

unread,
May 25, 2010, 4:01:15 PM5/25/10
to link-g...@googlegroups.com
That's the cause of your problem:

 java.io.FileNotFoundException: C:\yPrograms\WordNet\dict\verb.idx (The system cannot find the file specified)

Edit the file  ./data/wordnet/file_properties.xml and fix the WordNet path.

--
Murilo Saraiva de Queiroz, MSc.
Senior Software Engineer  
http://www.vettalabs.com
http://www.tecnologiainteligente.com.br
http://www.acalantoemcasa.com.br

Yogesh

unread,
May 25, 2010, 4:09:37 PM5/25/10
to link-g...@googlegroups.com
The WordNet path is correct. But the verb.idx file does not exist in the WordNet distribution. I use Windows. I tried WordNet 2.1 and also the WordNet 3.0. Neither have the verb.idx file. There only a verb.exc file in that directory.

Where can I find the verb.idx file?

-Yogesh


Murilo Saraiva de Queiroz

unread,
May 26, 2010, 9:56:56 AM5/26/10
to link-g...@googlegroups.com
Sorry, I don't have a Windows machine with WordNet installed so I can't answer that properly. I did a quick search and find someone recommending using WordNet 2.0 in Windows when using JWNL (the library we use to access WordNet from Java), but I don't know if it will works. 

Yogesh

unread,
May 26, 2010, 11:55:23 AM5/26/10
to link-g...@googlegroups.com
The WordNet that you have, does it have the verb.idx file (in the dict directory). If yes, it would be great if you could just ship it to me. At least the FileNotFoundException will be resolved.

Thanks

-Yogesh

Linas Vepstas

unread,
May 26, 2010, 11:57:22 PM5/26/10
to link-g...@googlegroups.com
On 26 May 2010 10:55, Yogesh <yoge...@gmail.com> wrote:
> The WordNet that you have, does it have the verb.idx file (in the dict
> directory). If yes, it would be great if you could just ship it to me. At
> least the FileNotFoundException will be resolved.

The verb.idx error is a red herring; you don't want the
PrincetonRandomAccessDictionary anyway.

You want the FIleBackedDictionary, and that one is failing for
you with the following:

[java] Error: Unable to initialize JWNL:
net.didion.jwnl.JWNLException: Una
ble to install net.didion.jwnl.dictionary.FileBackedDictionary
[java] net.didion.jwnl.JWNLException: The properties file must
specify a di
ctionary path


So I think you need to review your properties.

--linas

Reply all
Reply to author
Forward
0 new messages