NoSuchMethodError:de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter.isWriteToken()Z

时间:2016-06-20 10:05:58

标签: uima ruta dkpro-core

脚本

//------------------------------------------------------------------------
//      DKPRO - Imports
//------------------------------------------------------------------------
IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM  GeneratedDKProCoreTypes AS pos;
IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM GeneratedDKProCoreTypes;

UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter;
UIMAFIT de.tudarmstadt.ukp.dkpro.core.treetagger.TreeTaggerPosLemmaTT4J;//TreeTaggerPosTagger
//------------------------------------------------------------------------


//------------------------------------------------------------------------
//      DKPRO - Execution
//-------------------------------------------------- ----------------------

Document{-CONTAINS(pos.POS)} -> {
Document{-> SETFEATURE("language", "en")}; //"de"
Document{-> EXEC(StanfordSegmenter)};
Document{-> EXEC(TreeTaggerPosLemmaTT4J, {pos.POS})};//(TreeTaggerPosTagger, {pos.POS})};
};
//------------------------------------------------------------------------


//------------------------------------------------------------------------
//      DKPRO - Test
//------------------------------------------------------------------------
DECLARE DZC_DkProTest;
pos.NP{-> MARK(DZC_DkProTest)};
//------------------------------------------------------------------------

错误

org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.    

Caused by: java.lang.NoSuchMethodError: de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter.isWriteToken()Z

2 个答案:

答案 0 :(得分:2)

我将Maven中的DKPro Core版本从1.5.0更改为1.7.0然后问题得到了解决。我可以在de.tudarmstadt.ukp.dkpro.core.api.segmentation.SegmenterBase类中找到isWriteToken()方法。

答案 1 :(得分:1)

找不到StanfordSegmenter的一部分的方法isWriteToken(),这会导致错误。要么它不存在,要么你拼错了它。

如果没有更多信息,不知道还能告诉你什么。