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異常:錯誤初始化[類org.cleartk.classifier.jar.DefaultSequenceDataWriterFactory] 字段 'dataWriterClassName' 需要
我試圖與其他取代InstanceDataWriter數據編寫者,但他們不工作。