我正在尝试为StanfordNLP的关系提取器功能训练我自己的模型,如下所述:http://nlp.stanford.edu/software/relationExtractor.shtml。问题是,当我开始训练时,我得到以下异常:
PERCENTAGE OF TRAIN: 1.0
The reader log level is set to SEVERE
Adding annotator pos
Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [1.0 sec].
Adding annotator lemma
Adding annotator parse
Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ...done [0.9 sec].
Mar 25, 2015 9:23:36 PM edu.stanford.nlp.ie.machinereading.MachineReading makeResultsPrinters
INFO: Making result printers from
Mar 25, 2015 9:23:36 PM edu.stanford.nlp.ie.machinereading.MachineReading makeResultsPrinters
INFO: Making result printers from edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
at edu.stanford.nlp.ie.machinereading.MachineReading.makeResultsPrinters(MachineReading.java:771)
at edu.stanford.nlp.ie.machinereading.MachineReading.makeResultsPrinters(MachineReading.java:756)
at edu.stanford.nlp.ie.machinereading.MachineReading.makeMachineReading(MachineReading.java:235)
at edu.stanford.nlp.ie.machinereading.MachineReading.main(MachineReading.java:106)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at edu.stanford.nlp.ie.machinereading.MachineReading.makeResultsPrinters(MachineReading.java:768)
... 3 more
我正在使用StanfordNLP 3.5.1,而且这个类确实不存在于jar中。我正在使用roth.properties文件,如顶部链接中所述,其中包含以下行:
relationResultsPrinters = edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
我尝试评论该行,希望代码能够获取默认打印机,但仍然是RelationExtractorResultsPrinter。
任何人都有这个工作吗?
由于