我试图弄清楚如何从 Java 运行临床文档管道。我有一组纯文本的临床文件。我想解析这些文档并提取文档 doc_ID 中的列表,有频率为 freq 的 CUI。我花了几天时间安装 cTAKES 并寻找解决方案。我将其缩小到 ClinicalPipelineWithUmls.java,在其中进行测试并使用 AnaylisisEngineDescription 运行 SimplePipeline。这是代码的一部分:
String documentText = "Text of document to test goes here, such as the following. No edema, some soreness, denies pain.";
InputStream inStream = InputStreamCollectionReader.convertToByteArrayInputStream(documentText);
CollectionReader collectionReader = InputStreamCollectionReader.getCollectionReader(inStream);
AnalysisEngineDescription pipelineIncludingUmlsDictionaries = AnalysisEngineFactory.createAnalysisEngineDescription(
"desc/analysis_engine/AggregatePlaintextUMLSProcessor");
AnalysisEngineDescription xWriter = AnalysisEngineFactory.createPrimitiveDescription(
XWriter.class,
XWriter.PARAM_OUTPUT_DIRECTORY_NAME,
AssertionConst.evalOutputDir,
XWriter.PARAM_XML_SCHEME_NAME,
XWriter.XMI,
XWriter.PARAM_FILE_NAMER_CLASS_NAME,
CtakesFileNamer.class.getName());
SimplePipeline.runPipeline(collectionReader, pipelineIncludingUmlsDictionaries, xWriter);
System.out.println("Done at " + new Date());
问题是它找不到“InputStreamCollectionReader”。我搜索了它,但到目前为止没有成功!请您给我一个提示或指示一些方向吗?谢谢你的帮助!