繁体   English   中英

UIMA ruta - 使用来自不同视图的注释

[英]UIMA ruta - Using annotations from different views

我有一个文档,经过几次注释后,我正在使用HTMLConverter将其写入一个新视图

样本输入:

<p class="MsoNormal"><span data-bkmark="para10121"></span><span style="font-family:Arial; font-size:10pt; color:#color: #000000">[1] SJ. Goetsch,BD. Murphy,R. Schmidt,et al. "Physics of rotating gamma systems for stereotactic radiosurgery. "</span> <span style="font-family:Arial; font-size:10pt; color:#color: #000000">International Journal of Radiation Oncologybiologyphysics,</span> vol.<span style="font-family:Arial; font-size:10pt; color:#color: #000000">43, no.3, pp.689-696, 1999.</span><span data-bkmark="para10121"></span></p>

我正在使用htmlconvertor创建一个新视图“plaintextview”

  CONFIGURE(HtmlAnnotator, "onlyContent" = false); Document{-> EXEC(HtmlAnnotator)}; Document { -> CONFIGURE(HtmlConverter, "inputView" = "_InitialView","outputView" = "plaintextview"), EXEC(HtmlConverter,{TAG})}; 

之后我会运行自己的引擎并执行一些手动注释

 try { for (AnnotationFS afs : CasUtil.select(cas.getView("plaintextview"), type)) { Feature bookmarkFtr = type.getFeatureByBaseName("RefBookmark"); System.out.println("\\n Ref is " + afs.getCoveredText()); System.out.println("STart is " + afs.getBegin()); System.out.println("End is " + afs.getEnd()); String test = " vol.43, no.3, pp.689-696, 1999."; if (afs.getCoveredText().contains(test)) { int start = afs.getCoveredText().indexOf(test) + afs.getBegin(); int end = start + test.length(); testanno annotation = new testanno(cas.getView("plaintextview").getJCas()); annotation.setBegin(start); annotation.setEnd(end); annotation.addToIndexes(); } } } catch (Exception e) { e.printStackTrace(); } 

此代码将在明文 视图中注释特定文本(为什么? - 因为_initialview文档将在文本ex:vol.43,no.3,<some html tags> pp.689-696,1999之间具有html跨度

那么我如何从plaintextview到初始视图获取我的注释,或者使用我在不同视图中的注释(即_initialview和plaintextview)在我的ruta脚本中使用这些注释?

在Ruta中,您无法直接为特定CAS视图编写规则。 (您可以使用EXEC在Ruta脚本中的不同视图上应用分析引擎。)

通过在聚合分析引擎中应用沙发映射或将视图复制到新CAS的_initialView,正常的方法是在框架级别上。

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

UIMA RUTA 在“ <!--”</div--><div id="text_translate"><p> 我正在使用 UIMA RUTA 来注释各种文档。 它们来自不同的来源,有时会出现字符 &lt;. 出现在文档的中间。 &lt;! 被注释为 MARKUP 并被其他注释忽略。</p><p> 有没有办法改变这种行为? 即使我关闭 MARKUP 注释,&lt; 之后的文本。 没有被任何其他注释注释。</p><p> 我找到了负责创建大部分 MARKUP 注释的代码部分(org.apache.uima.ruta.seed 包中的 DefaultSeeder),但我无法找到代码的哪一部分负责以 &lt; 开头的 MARKUP 注释!</p><p> 感谢您的任何建议!</p></div>

[英]UIMA RUTA is not annotating text after “<!”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM