我的主程序看起来像:
public static void main(String args[]) throws UIMAException, IOException{
//TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription(Question.class);
AggregateBuilder builder = new AggregateBuilder();
//builder.add(SentenceAnnotator.getDescription());
builder.add(AnalysisEngineFactory.createPrimitiveDescription(POSAnnotator1.class,
ExampleComponents.TYPE_SYSTEM_DESCRIPTION,
GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH, outputDirectory + File.separator + "model.jar",
CleartkAnnotator.PARAM_IS_TRAINING, true,
DefaultDataWriterFactory.PARAM_DATA_WRITER_CLASS_NAME, InstanceDataWriter.class.getName(),
DirectoryDataWriterFactory.PARAM_OUTPUT_DIRECTORY, new File(outputDirectory)));
JCas jcas = JCasFactory.createJCas();
jcas.setDocumentText(testData);
SimplePipeline.runPipeline(jcas, builder.createAggregateDescription());
}
谁能解释这个错误?
原因:java.lang.IllegalArgumentException:初始化错误 [class org.cleartk.classifier.jar.DefaultSequenceDataWriterFactory] 字段“dataWriterClassName”是必需的
我试图用其他数据写入器替换 InstanceDataWriter,但它们不起作用。