我想在Ubuntu上使用Stanford CoreNLP 3.6.0尝试一种模式提取方法。 它通过运行模式提取方法作为默认设置(通过patterns / example.properties),如下所示:
java -mx1000m -cp "*" edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass -props patterns/example.properties
但是,当我将example.properties中的Pattern Scoring设置更改为" patternScoring = LOGREG"时,我遇到如下错误:
Cannot assign option field: java.lang.Class edu.stanford.nlp.patterns.ScorePhrases.phraseScorerClass value: edu.stanford.nlp.patterns.ScorePhrasesLearnFeatWt; invalid type
java.lang.RuntimeException: [Ljava.lang.Object;@466dd2b7
edu.stanford.nlp.util.logging.Redwood$Util.runtimeException(Redwood.java:973)
edu.stanford.nlp.util.Execution.fillField(Execution.java:243)
edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:477)
edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:536)
edu.stanford.nlp.util.Execution.fillOptions(Execution.java:599)
edu.stanford.nlp.util.Execution.fillOptions(Execution.java:603)
edu.stanford.nlp.patterns.ScorePhrases.<init>(ScorePhrases.java:50)
edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.convert2OneDim(ScorePatternsRatioModifiedFreq.java:198)
edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.score(ScorePatternsRatioModifiedFreq.java:89)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.getPatterns(GetPatternsFromDataMultiClass.java:1318)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply4Label(GetPatternsFromDataMultiClass.java:2310)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply(GetPatternsFromDataMultiClass.java:2124)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.runNineYards(GetPatternsFromDataMultiClass.java:3330)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.run(GetPatternsFromDataMultiClass.java:3310)
edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.main(GetPatternsFromDataMultiClass.java:3611)
Cannot assign option field: edu.stanford.nlp.patterns.ScorePhrases.phraseScorerClass value: edu.stanford.nlp.patterns.ScorePhrasesLearnFeatWt cause: [Ljava.lang.Object;@466dd2b7
java.lang.RuntimeException: [Ljava.lang.Object;@3cfb55fe
at edu.stanford.nlp.util.logging.Redwood$Util.runtimeException(Redwood.java:973)
at edu.stanford.nlp.util.Execution.fillField(Execution.java:257)
at edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:477)
at edu.stanford.nlp.util.Execution.fillOptionsImpl(Execution.java:536)
at edu.stanford.nlp.util.Execution.fillOptions(Execution.java:599)
at edu.stanford.nlp.util.Execution.fillOptions(Execution.java:603)
at edu.stanford.nlp.patterns.ScorePhrases.<init>(ScorePhrases.java:50)
at edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.convert2OneDim(ScorePatternsRatioModifiedFreq.java:198)
at edu.stanford.nlp.patterns.ScorePatternsRatioModifiedFreq.score(ScorePatternsRatioModifiedFreq.java:89)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.getPatterns(GetPatternsFromDataMultiClass.java:1318)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply4Label(GetPatternsFromDataMultiClass.java:2310)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.iterateExtractApply(GetPatternsFromDataMultiClass.java:2124)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.runNineYards(GetPatternsFromDataMultiClass.java:3330)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.run(GetPatternsFromDataMultiClass.java:3310)
at edu.stanford.nlp.patterns.GetPatternsFromDataMultiClass.main(GetPatternsFromDataMultiClass.java:3611)
有人知道如何解决这个问题吗?
谢谢,