1

脚本

//------------------------------------------------------------------------
//      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
4

2 に答える 2

2

Maven の DKPro Core バージョンを 1.5.0 から 1.7.0 に変更したところ、問題は解決しました。de.tudarmstadt.ukp.dkpro.core.api.segmentation.SegmenterBase クラスで isWriteToken() メソッドを見つけることができました。

于 2016-06-21T04:47:43.947 に答える