uima - 在 UIMA RUTA 中应用 COUNT 条件时出现问题
问题描述
我使用 COUNT Condition 来查找注释中的标点符号的数量。但是我没有收到预期的输出。
DECLARE Sentence(INT pmcount);
"Conflicts of interest"->Sentence;
DECLARE SentenceLastToken;
Sentence{-PARTOF(SentenceLastToken)->MARKLAST(SentenceLastToken)};
INT Pmcount=0;
Sentence->{ANY+?{->SHIFT(Sentence,1,1,true)} SentenceLastToken{PARTOF(PM)};};
Sentence{COUNT(PM,Pmcount)->Sentence.pmcount=Pmcount};
样本输入:
Conflicts of interest.
预期输出:
Conflicts of interest
pmcount:0
接收输出:
Conflicts of interest
pmcount:1
只有在 Annotation 值之后有任何 PM 时,我才会面临这个问题。
解决方案
推荐阅读
- php - WordPress 页面标题不显示
- chromium - 在自定义 ContextMenuHandler 中处理返回命令
- c# - 这是使 4 个方法同时异步运行的正确方法吗?
- r - 数据集让我困惑
- python - 如何将多个数据框列传递给函数
- java - 使用 unboundid 搜索 LDAP 中某个组的所有用户
- mysql - 在 Slick 中表达 SQL IF ELSE
- javascript - 在调查问卷末尾推送文件(json) - Javascript
- angular2-nativescript - NativeScript、Angular、HttpClient 获取标头:result.headers = undefined
- c# - C# List - 从对象列表创建排名