Open ghost opened 9 years ago
It seems like the statistical models are not recognized in your classpath. Have you looked at the following page for adding models?
https://github.com/clir/clearnlp-guidelines/blob/master/md/quick_start/models.md
Please let me know if you have trouble adding the models. Thanks!
best,
Jinho
I add all models to CLASSPATH with follow code( However my sence is that some of them don't need!):
export CLASSPATH=$CLEARNLP/clearnlp-3.1.2.jar:$CLEARNLP/args4j-2.0.29.jar:$CLEARNLP/log4j-1.2.17.jar:$CLEARNLP/hppc-0.6.1.jar:$CLEARNLP/xz-1.5.jar:$CLEARNLP/log4j.properties:$CLEARNLP/clearnlp-general-en-dep-3.2.jar:$CLEARNLP/clearnlp-dictionary-3.1.jar:$CLEARNLP/clearnlp-general-en-pos-3.2.jar:$CLEARNLP/clearnlp-global-lexica-3.1.jar:$CLEARNLP/clearnlp-general-en-ner-3.1.jar:$CLEARNLP/clearnlp-general-en-ner-gazetteer-3.0:$CLEARNLP/clearnlp-bioinformatics-en-pos-3.1.jar:$CLEARNLP/clearnlp-bioinformatics-en-dep-3.1.jar:.
but still get following errors:
java -Xmx10g -XX:+UseConcMarkSweepGC edu.emory.clir.clearnlp.bin.NLPTrain -mode dep -c config_train_dep.xml -f feature_en_dep.xml -t wsj_0001.parse.dep -d clearnlp.txt.cnlp -m dummy-dep.xz
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
log4j:WARN No appenders could be found for logger (edu.emory.clir.clearnlp.util.BinUtils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.NullPointerException
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.isGoldShift(AbstractDEPState.java:138)
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.getGoldLabel(AbstractDEPState.java:125)
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.getGoldLabel(AbstractDEPState.java:44)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.train(AbstractStatisticalComponent.java:279)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.process(AbstractStatisticalComponent.java:265)
at edu.emory.clir.clearnlp.component.mode.dep.AbstractDEPParser.process(AbstractDEPParser.java:96)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:268)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:251)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:104)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:53)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.train(AbstractNLPTrain.java:89)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.
I put log4j.properties into directory that include wsj_0001.parse.dep but still get follow errors. I Surprised that "Generating training instances:" is equal to "0".
java -Xmx10g -XX:+UseConcMarkSweepGC edu.emory.clir.clearnlp.bin.NLPTrain -mode dep -c config_train_dep.xml -f feature_en_dep.xml -t wsj_0001.parse.dep -d clearnlp.txt.cnlp -m dummy-dep.xz
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
Generating training instances: 0
java.lang.NullPointerException
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.isGoldShift(AbstractDEPState.java:138)
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.getGoldLabel(AbstractDEPState.java:125)
at edu.emory.clir.clearnlp.component.mode.dep.state.AbstractDEPState.getGoldLabel(AbstractDEPState.java:44)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.train(AbstractStatisticalComponent.java:279)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.process(AbstractStatisticalComponent.java:265)
at edu.emory.clir.clearnlp.component.mode.dep.AbstractDEPParser.process(AbstractDEPParser.java:96)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:268)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:251)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:104)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:53)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.train(AbstractNLPTrain.java:89)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.
Sorry for the late reply; I've been away for past weeks. I'll take a look into this on Wed. and let you know. Thanks!
best,
Jinho
How is this problem going? I met the same problem!
thnaks
On Tuesday, June 30, 2015 5:01 AM, Jinho D. Choi <notifications@github.com> wrote:
Sorry for the late reply; I've been away for past weeks. I'll take a look into this on Wed. and let you know. Thanks!best,Jinho— Reply to this email directly or view it on GitHub.
I want to train with follow command. java -Xmx10g -XX:+UseConcMarkSweepGC edu.emory.clir.clearnlp.bin.NLPTrain -mode dep -c config_train_dep.xml -f feature_en_dep.xml -t wsj_0001.parse.dep -d clearnlp.txt.cnlp -m dummy-dep.xz
but follow erorr represented: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar java.io.IOException: Stream closed at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:159) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at java.io.DataInputStream.readFully(DataInputStream.java:195) at java.io.DataInputStream.readFully(DataInputStream.java:169) at org.tukaani.xz.SingleXZInputStream.initialize(Unknown Source) at org.tukaani.xz.SingleXZInputStream.(Unknown Source)
at org.tukaani.xz.XZInputStream.(Unknown Source)
at org.tukaani.xz.XZInputStream.(Unknown Source)
at edu.emory.clir.clearnlp.component.utils.NLPUtils.getObjectInputStream(NLPUtils.java:173)
at edu.emory.clir.clearnlp.component.utils.NLPUtils.getDistributionalSemantics(NLPUtils.java:166)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.lambda$initDistributionalSemanticsWords$23(GlobalLexica.java:58)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica$$Lambda$1/553264065.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.initDistributionalSemanticsWords(GlobalLexica.java:58)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.init(GlobalLexica.java:46)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.train(AbstractNLPTrain.java:87)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.(AbstractNLPTrain.java:78)
at edu.emory.clir.clearnlp.bin.NLPTrain.(NLPTrain.java:37)
at edu.emory.clir.clearnlp.bin.NLPTrain.main(NLPTrain.java:44)
log4j:WARN No appenders could be found for logger (edu.emory.clir.clearnlp.util.BinUtils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.NullPointerException
at edu.emory.clir.clearnlp.component.utils.NLPUtils.getDistributionalSemantics(NLPUtils.java:157)
at edu.emory.clir.clearnlp.component.utils.NLPUtils.getDistributionalSemantics(NLPUtils.java:166)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.lambda$initDistributionalSemanticsWords$23(GlobalLexica.java:58)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica$$Lambda$1/553264065.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.initDistributionalSemanticsWords(GlobalLexica.java:58)
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.init(GlobalLexica.java:46)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.train(AbstractNLPTrain.java:87)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.(AbstractNLPTrain.java:78)
at edu.emory.clir.clearnlp.bin.NLPTrain.(NLPTrain.java:37)
at edu.emory.clir.clearnlp.bin.NLPTrain.main(NLPTrain.java:44)
java.lang.NullPointerException
at edu.emory.clir.clearnlp.component.utils.GlobalLexica.getDistributionalSemanticFeatures(GlobalLexica.java:69)
at edu.emory.clir.clearnlp.feature.common.CommonFeatureExtractor.getFeatures(CommonFeatureExtractor.java:82)
at edu.emory.clir.clearnlp.feature.common.CommonFeatureExtractor.getFeatures(CommonFeatureExtractor.java:35)
at edu.emory.clir.clearnlp.feature.AbstractFeatureExtractor.getFeatures(AbstractFeatureExtractor.java:197)
at edu.emory.clir.clearnlp.feature.AbstractFeatureExtractor.addSetFeatures(AbstractFeatureExtractor.java:151)
at edu.emory.clir.clearnlp.feature.AbstractFeatureExtractor.addFeatures(AbstractFeatureExtractor.java:116)
at edu.emory.clir.clearnlp.feature.AbstractFeatureExtractor.createStringFeatureVector(AbstractFeatureExtractor.java:98)
at edu.emory.clir.clearnlp.component.mode.dep.AbstractDEPParser.createStringFeatureVector(AbstractDEPParser.java:117)
at edu.emory.clir.clearnlp.component.mode.dep.AbstractDEPParser.createStringFeatureVector(AbstractDEPParser.java:36)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.train(AbstractStatisticalComponent.java:278)
at edu.emory.clir.clearnlp.component.AbstractStatisticalComponent.process(AbstractStatisticalComponent.java:265)
at edu.emory.clir.clearnlp.component.mode.dep.AbstractDEPParser.process(AbstractDEPParser.java:96)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:268)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.process(AbstractNLPTrainer.java:251)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:104)
at edu.emory.clir.clearnlp.component.trainer.AbstractNLPTrainer.train(AbstractNLPTrainer.java:53)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.train(AbstractNLPTrain.java:89)
at edu.emory.clir.clearnlp.bin.helper.AbstractNLPTrain.(AbstractNLPTrain.java:78)
at edu.emory.clir.clearnlp.bin.NLPTrain.(NLPTrain.java:37)
at edu.emory.clir.clearnlp.bin.NLPTrain.main(NLPTrain.java:44)
In addition,I wrtie follow command in terminal : CLEARNLP=/home/clearnlp export CLASSPATH=$CLEARNLP/clearnlp-3.1.2.jar:$CLEARNLP/args4j-2.0.29.jar:$CLEARNLP/log4j-1.2.17.jar:$CLEARNLP/hppc-0.6.1.jar:$CLEARNLP/xz-1.5.jar:$CLEARNLP/log4j.properties:.