我正在使用Stanford NER,每当我尝试初始化分类器时,我都会遇到以下异常:
Exception in thread "main" java.lang.NoSuchFieldError: featureFactoryArgs
at edu.stanford.nlp.ie.AbstractSequenceClassifier.<init>(AbstractSequenceClassifier.java:127)
at edu.stanford.nlp.ie.crf.CRFClassifier.<init>(CRFClassifier.java:173)
at edu.stanford.nlp.ie.crf.CRFClassifier.getClassifierNoExceptions(CRFClassifier.java:3518)
我的代码:
String serializedClassifier = "classifiers/english.all.3class.caseless.distsim.crf.ser.gz";
AbstractSequenceClassifier<CoreLabel> classifier =
CRFClassifier.getClassifierNoExceptions(serializedClassifier);