Below JAPE rule will replace the Email annotation by Address or just add an extra annotation Address ?
Rule: EmailFinal
Priority: 50
(
{Email}
)
:address
-->
:address.Address = {kind = "email", rule = "EmailFinal"}
Below JAPE rule will replace the Email annotation by Address or just add an extra annotation Address ?
Rule: EmailFinal
Priority: 50
(
{Email}
)
:address
-->
:address.Address = {kind = "email", rule = "EmailFinal"}
A :label.Type = {...}
will always create a new annotation, but it won't touch the existing ones. If you want to delete the input annotation then you need to add a second action to your rule:
Rule: EmailFinal
Priority: 50
(
{Email}
)
:address
-->
:address.Address = {kind = "email", rule = "EmailFinal"},
:address { inputAS.removeAll(addressAnnots); }