From user-return-8095-apmail-uima-user-archive=uima.apache.org@uima.apache.org Fri Apr 19 19:11:28 2019 Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 90C3418D83 for ; Fri, 19 Apr 2019 19:11:28 +0000 (UTC) Received: (qmail 64053 invoked by uid 500); 19 Apr 2019 19:11:27 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 64022 invoked by uid 500); 19 Apr 2019 19:11:27 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 64007 invoked by uid 99); 19 Apr 2019 19:11:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Apr 2019 19:11:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C17A1C044D for ; Fri, 19 Apr 2019 19:11:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.802 X-Spam-Level: * X-Spam-Status: No, score=1.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id uS1K7PScB1PW for ; Fri, 19 Apr 2019 19:11:25 +0000 (UTC) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BA1605FDE1 for ; Fri, 19 Apr 2019 19:11:24 +0000 (UTC) Received: by mail-ot1-f52.google.com with SMTP id k21so5054708otf.1 for ; Fri, 19 Apr 2019 12:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Ixx8lu1hSDwYFSZA1hopn4vSpI8jsBnz1+DLydsNXRM=; b=dvbnOWQnbCJRfmGsC1XYnUtawuBj3x8zNZywHugfx7fHOKYmMbqxuLPNk388VclsMH A441cPQ+Krv0v3ueihylJr7MGbyEqXJ+5h7wlkUE7LnON9CHW7Fp8gOniJ51RNXyJ2vV Jyi0bmfmqM4bCjdbY/kDBsSQzqX0al2/DW57g9JYRmeCbitXqM612jxIbJ1+VbrBfE0U W7iC6s/wPTU1ypsuVdzAWofXy+SSqim2jfjyRETI0Z36gwHtpyeslzXOPUk+j1s89tIO HDt7ancabakDxuJYMM7xPGmOmmTU2MnqsFP4UliwHM8CoHkytg4vy3YjQBvQF1F3/vDH LYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Ixx8lu1hSDwYFSZA1hopn4vSpI8jsBnz1+DLydsNXRM=; b=gXqJtO20OFrBWT0ZUp0y76NtVT1DDV7wPCTCcd9LzP6QRjKIiJrGcA0eFkbJPb9Gt7 1xoY73sa5EI0QMVzji/jv4IFylduMWFMkrGdz6rjWlmakthUvugeoFPCmXhf/QUIUq8x fQsDJS/6OMFOmsIhJOpRao1ErwLHGn1l2RoxBYbgdLnlnNEpuk3lh7Ssmtix409JbUKu O8VHpod7T0dGx2qhezdpbYwIaXVycLhfs0nJ1kodonZJEF2gKqaF3MCKFf4LG3qNJ11x 2mwlzYXtidBKKVlwazZ/opsWmV36SQEIVvPcXI9dL079LeFytOwhDCseLWfv+sQI/6oW Yfag== X-Gm-Message-State: APjAAAXviCwV3CNxL6oeJQlhgpqX94pxToCeerWJiWAQzwLRqq8vjTvo ib+B1YuA4u9Xn7lrK0iOBc2AUQnsZkj3vCtTp3Hk0XpVS7I= X-Google-Smtp-Source: APXvYqybx6N7+9YgqifZWm+1i2v7b1+2loO7k4u4L3ntDczD2m+hO9Q4UW1w0wYnLA2YvPOzOQ8a2uops3H+pdLBngI= X-Received: by 2002:a9d:6381:: with SMTP id w1mr3409841otk.314.1555701083806; Fri, 19 Apr 2019 12:11:23 -0700 (PDT) MIME-Version: 1.0 References: <069098c4-77f9-41ca-22f8-5af71f711f19@averbis.com> In-Reply-To: <069098c4-77f9-41ca-22f8-5af71f711f19@averbis.com> From: Nikolai Krot Date: Fri, 19 Apr 2019 21:10:57 +0200 Message-ID: Subject: Re: deleting temporary annotations To: user@uima.apache.org Content-Type: multipart/alternative; boundary="0000000000007a1ecb0586e6e2b2" --0000000000007a1ecb0586e6e2b2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=BCgl 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 t= o > > delete such temporary annotations (form the document) when the annotati= on > > 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 extendin= g > > DECLARE statement to include an indication of such tempoary nature of t= he > > type, a la > > > > DECLARE leftBoundary as local; > > > > > > Opinions? Ideas? > > > > Best regards, > > Nikolai > > > -- > Dr. Peter Kl=C3=BCgl > 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=C3=A9l Mark=C3=B3 > > --0000000000007a1ecb0586e6e2b2--