以下JAPE规则是否会覆盖现有注释或添加额外注释?

时间:2015-11-17 07:57:37

标签: information-retrieval gate information-extraction

JAPE规则下面将用地址替换电子邮件注释,或者只添加一个额外的注释地址?

Rule: EmailFinal
Priority: 50
(
{Email}
)
:address
-->
:address.Address = {kind = "email", rule = "EmailFinal"}

1 个答案:

答案 0 :(得分:2)

:label.Type = {...}将始终创建新注释,但不会触及现有注释。如果要删除输入注释,则需要向规则添加第二个操作:

Rule: EmailFinal
Priority: 50
(
{Email}
)
:address
-->
:address.Address = {kind = "email", rule = "EmailFinal"},
:address { inputAS.removeAll(addressAnnots); }