I am doing the test run with the following command :
LIBDIR=/home/estelle/opennlp-tools/lib
CLASSPATH=.:$LIBDIR/opennlp-tools-1.4.3.jar:$LIBDIR/trove.jar:$LIBDIR/maxent-2.5.2.jar:$LIBDIR/jwnl-1.3.3.jar
java -classpath $CLASSPATH opennlp.tools.lang.english.SentenceDetector \ opennlp.models/english/sentdetect/EnglishSD.bin.gz < A01.txt
But I get the following error :
Exception in thread "main" java.io.FileNotFoundException: opennlp.models/english/sentdetect/EnglishSD.bin.gz (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at opennlp.maxent.io.SuffixSensitiveGISModelReader.<init>(SuffixSensitiveGISModelReader.java:50)
at opennlp.tools.lang.english.SentenceDetector.<init>(SentenceDetector.java:43)
at opennlp.tools.lang.english.SentenceDetector.main(SentenceDetector.java:56)
I suppose my models files are in the wrong place but I can't find any information on where to download them.
Could you tell me what goes wrong please ?
Thank you.
Estelle
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Thanks for your detailed post. The "opennlp.models/english/sentdetect/EnglishSD.bin.gz" portion of the command refers to the location of this model file on your file system. Based on the layout you have presented it should be: "english/sentdetect/EnglishSD.bin.gz" if you are running the command from the opennlptools directory. More specifically:
Hello,
I am new to OpenNLP and I would like to make a test run.
I work from the directory ''opennlptools" which is organized as followed :
opennlptools /
------- A01.txt
-------+lib/
------------- opennlp-tools-1.4.3.jar
------------- trove.jar
------------- maxent-2.5.2.jamaxent-2.5.2.jar
------------- wnl-1.3.3.jar
--------+english
-------------+sentdect
----------------------- EnglishSD.bin.gz
-------------+tokenize
----------------------- EnglishTok.bin.gz
I am doing the test run with the following command :
LIBDIR=/home/estelle/opennlp-tools/lib
CLASSPATH=.:$LIBDIR/opennlp-tools-1.4.3.jar:$LIBDIR/trove.jar:$LIBDIR/maxent-2.5.2.jar:$LIBDIR/jwnl-1.3.3.jar
java -classpath $CLASSPATH opennlp.tools.lang.english.SentenceDetector \ opennlp.models/english/sentdetect/EnglishSD.bin.gz < A01.txt
But I get the following error :
Exception in thread "main" java.io.FileNotFoundException: opennlp.models/english/sentdetect/EnglishSD.bin.gz (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at opennlp.maxent.io.SuffixSensitiveGISModelReader.<init>(SuffixSensitiveGISModelReader.java:50)
at opennlp.tools.lang.english.SentenceDetector.<init>(SentenceDetector.java:43)
at opennlp.tools.lang.english.SentenceDetector.main(SentenceDetector.java:56)
I suppose my models files are in the wrong place but I can't find any information on where to download them.
Could you tell me what goes wrong please ?
Thank you.
Estelle
Hi,
Thanks for your detailed post. The "opennlp.models/english/sentdetect/EnglishSD.bin.gz" portion of the command refers to the location of this model file on your file system. Based on the layout you have presented it should be: "english/sentdetect/EnglishSD.bin.gz" if you are running the command from the opennlptools directory. More specifically:
java -classpath $CLASSPATH opennlp.tools.lang.english.SentenceDetector \ english/sentdetect/EnglishSD.bin.gz < A01.txt
Hope this helps...Tom