Hi,

why do you want to remove them? I tend to keep them for better
explainability of the rule inference.


In UIMA 2, removing the annotation will mainly only influence the index.
The garbage collector will not clean them up. Well, in UIMA 3 that
changes...


If you want to remove them, there are several options. I would prefer to
either use a parent type or an annotation list. Just a quick guess...


Use a single parent type to identify temporary annotations:


DECLARE Local LeftBoundary;

DECLARE Local RightBoundary;

l:Local{-> UNMARK(l)};


Store temporary annotations in a list and remove the values of the list:


ANNOTATIONLIST locals;

lb:LeftBoundary{-> ADD(locals, lb)};

l:locals{-> UNMARK(l)};


Best,


Peter


Am 17.04.2019 um 21:15 schrieb Nikolai Krot:
> Hi all,
>
> When developing rules, i often use temporary annotations. For example, to
> create an anchor, another rule will rely upon. Is there any quick way to
> delete such temporary annotations (form the document) when the annotation
> process has concluded? For the time being, I delete them individually with
> an UNMARK statement, like this:
>
> leftBoundary {-> UNMARK(leftBoundary)};
>
>
> If such a shortcut does not yet exist, what do you think about extending
> DECLARE statement to include an indication of such tempoary nature of the
> type, a la
>
> DECLARE leftBoundary as local;
>
>
> Opinions? Ideas?
>
> Best regards,
> Nikolai
>
-- 
Dr. Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.klu...@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó

Reply via email to