gpt4 book ai didi

java - 如何将cleartk管道传输到ruta?

转载 作者:太空宇宙 更新时间:2023-11-04 12:14:57 25 4
gpt4 key购买 nike

ErroR MesSagE 我在我的项目中使用 cleartkRuta。我想使用 SimplePipeline 将 ClearTk 与 Ruta 连接。如何将 ClearTk 输出值传递到 Ruta 脚本中?Cleartk Github链接是Github Example ClearTk

我正在尝试这个方法

CollectionReader reader = UriCollectionReader.getCollectionReaderFromFiles(files);

// The pipeline of annotators
AggregateBuilder builder = new AggregateBuilder();

// An annotator that reads in the file text
builder.add(UriToDocumentTextAnnotator.getDescription());

// An annotator that adds Sentence annotations
builder.add(SentenceAnnotator.getDescription());

// An annotator that adds Token annotations
builder.add(TokenAnnotator.getDescription());

// The POS annotator, configured to make predictions
builder.add(ExamplePOSAnnotator.getClassifierDescription(ExamplePOSAnnotator.DEFAULT_MODEL));

// An annotator that write out the tokens and their part of speech tags
builder.add(AnalysisEngineFactory.createPrimitiveDescription(ExamplePOSPlainTextWriter.class,
ExamplePOSPlainTextWriter.PARAM_OUTPUT_DIRECTORY_NAME,
ExamplePOSPlainTextWriter.DEFAULT_OUTPUT_DIRECTORY));

/*=======================================
* Ruta
*======================================*/
AnalysisEngineDescription ruta = AnalysisEngineFactory.createEngineDescription(RutaEngine.class,
RutaEngine.PARAM_MAIN_SCRIPT, "Explico_Basic");

// Run the pipeline of annotators on each of the CASes produced by the
// reader
SimplePipeline.runPipeline(reader, builder.createAggregateDescription(),ruta);

System.out.println("Please look at the file generated by this program: "
+ ExamplePOSPlainTextWriter.DEFAULT_OUTPUT_DIRECTORY + "/2008_Sichuan_earthquake.txt.pos");

但它抛出一个错误。

我的新错误消息是......

Sep 21, 2016 10:44:01 PM                org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl     callAnalysisComponentProcess(417)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Sep 21, 2016 10:44:01 PM org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl processAndOutputNewCASes(273)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Exception in thread "main" org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)Sep 21, 2016 10:44:01 PM org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl callAnalysisComponentProcess(417)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Sep 21, 2016 10:44:01 PM org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl processAndOutputNewCASes(273)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Exception in thread "main" org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8Sep 21, 2016 10:44:01 PM org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl callAnalysisComponentProcess(417)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Sep 21, 2016 10:44:01 PM org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl processAndOutputNewCASes(273)
SEVERE: Exception occurred
org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

Exception in thread "main" org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed.
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:308)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265)
at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8
at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)
at org.cleartk.examples.pos.RunExamplePOSAnnotator.main(RunExamplePOSAnnotator.java:95)
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.FSIndexRepositoryImpl.getIndex(FSIndexRepositoryImpl.java:2465)
at org.apache.uima.cas.impl.CASImpl.getAnnotationIndex(CASImpl.java:4544)
at org.apache.uima.ruta.RutaStream.updateIterators(RutaStream.java:174)
at org.apache.uima.ruta.RutaStream.<init>(RutaStream.java:128)
at org.apache.uima.ruta.engine.RutaEngine.initializeStream(RutaEngine.java:698)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:556)
at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
... 8 more

我的示例输入是...

2008 Sichuan earthquake
From Wikipedia, the free encyclopedia

The 2008 Sichuan earthquake occurred at 14:28:01.42 CST (06:28:01.42 UTC) on 12 May 2008, with its epicenter in Wenchuan County (Chinese: ???; Pinyin: W�nchuan Xi�n), Sichuan province of the People's Republic of China. It had a magnitude of 7.8 Ms according to the State Seismological Bureau of China and 7.9 Mw according to the United States Geological Survey. The epicenter was 90 kilometres (55 miles) west-northwest of Chengdu, the capital of Sichuan, with a depth of 19 kilometres (12 mi). The earthquake was felt as far away as Beijing and Shanghai, where office buildings swayed with the tremor. The earthquake was also felt in nearby countries, such as Pakistan, Thailand, and Vietnam.

Official figures (as of May 14) state that 16,665 are confirmed dead and 66,286 injured, Thousands are missing, many of them buried, and eight provinces were affected. These figures are likely to rise sharply as a clearer picture emerges. It was the deadliest and strongest earthquake to hit China since the 1976 Tangshan earthquake, which killed approximately 250,000 people.

The epicenter was in Wenchuan County, Ngawa Prefecture, 90 km northwest of Chengdu, with its main tremor so far occurring at 14:28:01.42 CST (06:28:01.42 UTC), on Monday 12 May 2008. Early reports of the earthquake's magnitude ranged from 7.5 to 8.0. Forty-six major aftershocks, ranging in magnitude from 4.4 to 6.0, were recorded within 40 hours of the main tremor.

Office workers in Chengdu reported a "continuous shaking for about two or three minutes", and many people rushed outside.

我的脚本是......

DECLARE Year;
"2008"->Year;

最佳答案

问题在于 CA 的类型系统不包含 UIMA Ruta 所需的类型,尤其是 RutaBasic 类型。通常,对于您的代码示例,我希望 uimaFIT(例如 2.2.0)自动包含 ruta 类型系统。请验证问题的示例代码是否是导致异常的代码。如果这是真的,那么您的 uimaFIT 版本或您的依赖项(例如 ruta-core)有问题。

上一个问题:

问题是没有找到Ruta分析引擎应该执行的主脚本。现在,通过此参数配置,预计类路径的根目录中有一个文件 MainEngine.ruta

(错误消息表明该脚本名为 Explico_BasicEngine。因此您的示例代码与异常不匹配。)

您需要将文件放置在那里,或者将参数设置更改为 my.package.MyScript (文件位于类路径中的位置)。

您还可以设置配置参数scriptPaths来替换类路径。然后,需要相对于该参数的值来定位该文件。 (类路径查找是后备)

免责声明:我是 UIMA Ruta 的开发者

关于java - 如何将cleartk管道传输到ruta?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39510744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com