我的工作是计划使用UIMA集群来运行文档以提取命名实体,而不是.据我了解,UIMA的NLP组件很少包装.我现在已经测试了GATE一段时间了,并且相当舒服.它在正常文本上运行正常,但是当我们通过一些有代表性的测试数据运行它时,精度会下降.我们内部的文本数据有时是全部大写,有时全是小写,或者是同一文档中两者的混合.即使使用ANNIE的全部大写规则,准确性仍然有很多不足之处.我最近听说过Stanford NLP和OpenNLP,但没有时间对它们进行广泛的训练和测试.这两者在准确性方面与ANNIE相比如何?他们是否像GATE一样与UIMA合作?
提前致谢.
我一直在使用Apache OpenNLP进行一些功能测试,它具有Sentence检测,Tokenization,Name实体识别功能.现在,当我开始查看UIMA文档时,在UIMA主页上提到 - "语言识别"=>"语言特定分段"=>"句子边界检测"=>"实体检测(人/地名等)".
这说我可以使用UIMA完成与OpenNLP相同的任务.增加了什么功能?我是这个领域的新手,请帮助我理解两者的用途和能力.
我在apache spark上运行UIMA应用程序.UIMA RUTA需要处理数百万个页面才能进行计算.但是有一段时间我面临内存异常.它会在成功处理2000页时抛出异常,但有些时候会在500页上失败.
应用日志
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.apache.uima.internal.util.IntArrayUtils.expand_size(IntArrayUtils.java:57)
at org.apache.uima.internal.util.IntArrayUtils.ensure_size(IntArrayUtils.java:39)
at org.apache.uima.cas.impl.Heap.grow(Heap.java:187)
at org.apache.uima.cas.impl.Heap.add(Heap.java:241)
at org.apache.uima.cas.impl.CASImpl.ll_createFS(CASImpl.java:2844)
at org.apache.uima.cas.impl.CASImpl.createFS(CASImpl.java:489)
at org.apache.uima.cas.impl.CASImpl.createAnnotation(CASImpl.java:3837)
at org.apache.uima.ruta.rule.RuleMatch.getMatchedAnnotations(RuleMatch.java:172)
at org.apache.uima.ruta.rule.RuleMatch.getMatchedAnnotationsOf(RuleMatch.java:68)
at org.apache.uima.ruta.rule.RuleMatch.getLastMatchedAnnotation(RuleMatch.java:73)
at org.apache.uima.ruta.rule.ComposedRuleElement.mergeDisjunctiveRuleMatches(ComposedRuleElement.java:330)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:213)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:362)
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:459)
at org.apache.uima.ruta.rule.ComposedRuleElement.continueMatch(ComposedRuleElement.java:225) …Run Code Online (Sandbox Code Playgroud) 我试图弄清楚如何从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());
Run Code Online (Sandbox Code Playgroud)
问题是找不到"InputStreamCollectionReader".我搜索它但到目前为止没有成功!你能给我一个提示或显示一些指示吗?谢谢你的帮助!
我一直在寻找在Java程序中使用Apache UIMA的示例.是否有关于如何在Java程序中使用示例Annotators的示例?
UIMA中有没有办法从令牌中访问注释,就像它们在CAS调试器GUI中一样?您当然可以从索引存储库访问所有注释,但我想循环使用标记,并获取每个标记的所有关联注释.
原因很简单,我想要检查一些注释并丢弃其他注释,这样就容易多了.任何帮助表示赞赏:)
我是UIMA Ruta的新手.我使用脚本语言制作了一些注释器.我可以在EclipseIDE中运行它们.我想编写一个JAVA API来自动运行提供的输入脚本.
我使用的是UIMA文档中提供的相同示例项目.
到目前为止,我已经能够做到这一点
try {
File taeDescriptor = null;
File inputDir = null;
// Read and validate command line arguments
boolean validArgs = false;
if (args.length == 2) {
taeDescriptor = new File(args[0]);
inputDir = new File(args[1]);
validArgs = taeDescriptor.exists()
&& !taeDescriptor.isDirectory()
&& inputDir.isDirectory();
}
if (!validArgs) {
printUsageMessage();
} else {
// get Resource Specifier from XML file
XMLInputSource in = new XMLInputSource(taeDescriptor);
ResourceSpecifier specifier = UIMAFramework.getXMLParser()
.parseResourceSpecifier(in);
// for debugging, output the Resource Specifier
// System.out.println(specifier); …Run Code Online (Sandbox Code Playgroud) 我试图uimascala在我的项目中包含一个已知的依赖项.它可以在Sonatype存储库中使用,但由于某些原因,SBT无法找到它.这是我的build.sbt.
val sparkCore = "org.apache.spark" % "spark-core_2.10" % "1.2.0"
val uimaScala = "com.github.jenshaase.uimascala" % "uimascala-core_2.10" % "0.5.0-SNAPSHOT"
// test deps
val specs2 = "org.specs2" %% "specs2-core" % "2.4.15" % "test"
lazy val commonSettings = Seq(
organization := "foo",
version := "0.1.0",
scalaVersion := "2.10.4"
)
lazy val `twitter-sentiment-stream` = (project in file(".")).
settings(commonSettings: _*).
settings(
name := "bar",
resolvers ++= Seq(
//"Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/",
"Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
),
libraryDependencies ++= Seq(sparkCore, uimaScala, specs2)
) …Run Code Online (Sandbox Code Playgroud) Standford Core NLP和GATE提供各种NLP操作,如NER,POS标记.有一些NLP操作,如Tokenizer,Snowball Stemmer可用作UIMA组件.那么,UIMA是否可以与StandfordCore NLP/GATE相媲美,还是用于为管道包装这些API?
我是Eclipse和UIMA的新手.我正在尝试在Eclipse Luna -j2ee平台上运行UIMA示例.我可以在示例中从终端运行cvd.sh.
当我尝试从"运行配置"运行示例时,我遇到如下错误:
Error: Could not find or load main class org.apache.uima.tools.cvd.CVD
<terminated>UIMA CAS Visual Debugger [Java Application]
<terminated, exit value: 1>/usr/lib/jvm/java-7-openjdk-i386/bin/java (22-May-2015 5:52:13 am)
Run Code Online (Sandbox Code Playgroud)
我试图从运行配置运行,我也看到其他示例的类似错误,如 -
Error: Could not find or load main class org.apache.uima.tools.AnnotationViewerMain
<terminated>UIMA Annotation Viewer [Java Application]
<terminated, exit value: 1>/usr/lib/jvm/java-7-openjdk-i386/bin/java (22-May-2015 6:33:43 am)
Run Code Online (Sandbox Code Playgroud)
可能是什么问题呢?
我觉得它可能是一些路径相关的问题,因为终端apache-uima/bin中的示例(至少其中一些)正在工作......
我正在使用debian,如果这有帮助的话.