Hi Peter, Well, I want to remove them to make the output thinner. XML is very verbose, and when it comes to persisting a large number of cas files, every extra annotation can make the life harder in the long run. I do agree, that it is good to keep them for explainability and debugging purposes. I was about to ask another question of whether unmarking a parent also unmarks the child annotations -- I noticed this happen while experimenting -- and your example confirms it ;) DECLARE Local LeftBoundary; DECLARE Local RightBoundary; l:Local{-> UNMARK(l)}; Honestly, it is not intuitive that child nodes will be affected. The documentation does not mention it at all. Would you mind explaining the purpose of parent classes? Another question... I thought that derived annotations will inherit the properties of their parent annotation, like normal subclasses in OOP, but looks like they dont: DECLARE Money (STRING name, INT amount); DECLARE Money SellPrice; In this example, SellPrice does not automatically have the fields that Money has. Hmm.. Why does one need to use parent class then? Related question, what if I declare SellPrice with the same fields: DECLARE Annotation Money (STRING name, INT amount); DECLARE Money SellPrice (STRING name, INT amount); what is then the easier method of copying the values from Money to SellPrice? For the time being, I use TRANSFER statement, like this: SomeContent Money {-> TRANSFER(SellPrice) } SomeContext; Frohe Ostern! BR, Nikolai On Thu, Apr 18, 2019 at 11:25 PM Peter Klügl wrote: > 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.kluegl@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ó > >