Tag: uima

在火花环境中的Uima Ruta Out of Memory问题

我在apache spark上运行UIMA应用程序。 UIMA RUTA有数百万页需要批量处理才能进行计算。 但是有一段时间我面临内存exception。它会在成功处理2000页的时候抛出exception,但有些时候会在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 […]

如果我想使用一个依赖于UIMA的库,我是否需要重写整个java项目?

我想在java项目中使用https://code.google.com/p/heideltime/ 。 该代码“适合UIMA管道”,这是我根本无法理解的。 UIMA看起来像是为了解决我没有的大量问题而设计的,所以我只想获得运行该代码所需的最小量的UIMA。 有一个简单的例子,我可以运行一个简单的UIMA程序吗? 我已经添加 org.uimafit uimafit 1.4.0 org.apache.uima uimaj-core 2.4.0 org.apache.uima uimaj-tools 2.4.0 到我的pom.xml但由于某种原因,maven仍然不会编译这个: import org.apache.uima.jcas.JCas; import org.apache.uima.util.Level; import org.uimafit.component.JCasAnnotator_ImplBase; import org.uimafit.descriptor.ConfigurationParameter; import org.uimafit.descriptor.TypeCapability; import org.uimafit.examples.tutorial.type.RoomNumber; public class RoomNumberAnnotatorPipeline { public static void main(String[] args) throws Exception { String text = “The meeting was moved from Yorktown 01-144 to Hawthorne 1S-W33.”; TypeSystemDescription tsd […]