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 [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8579C18F78 for ; Tue, 13 Oct 2015 10:18:25 +0000 (UTC) Received: (qmail 41171 invoked by uid 500); 13 Oct 2015 10:17:51 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 41125 invoked by uid 500); 13 Oct 2015 10:17:51 -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 41113 invoked by uid 99); 13 Oct 2015 10:17:50 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2015 10:17:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7B2B4180A63 for ; Tue, 13 Oct 2015 10:17:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NF1oyRTfDD6p for ; Tue, 13 Oct 2015 10:17:39 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id BD8512054C for ; Tue, 13 Oct 2015 10:17:38 +0000 (UTC) Received: by lbbk10 with SMTP id k10so14134221lbb.0 for ; Tue, 13 Oct 2015 03:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=FyhEnLGhm8t53klv1K+LS6v1jf2383Wx2JqtGTGj+jE=; b=YQdUYywCqyoCmCGtSKQ8yt4Xwg3B5wVr3O5b26AtG7TvyGetyA3x/M7BV+nA9GuS8a M0Gfuaa/iq/p+KCKN4nXNa7xx7KSyByaoU2lr5tVzR3j8lMzjsaKSHiej4JWO9Xkl8zZ SWb/v5+4pZiIBEXIJMZxZinP3V64DP2P6Y/5rwgER99b/uAgKAiSLcoqUvnnQWBjNdNc FzAvO8TYk2NGzhFcI/vyM4FfxCUNJy+JIHBfsioi1Bj56a3a/+NgAzsePm91mRgaWkPO 8SKgYlthJDCO1neoodb38eHCd73q8YYCQe4UXzx5cjpnys/lwfOaBzoFKhEtoZGU1IJA awbw== X-Received: by 10.112.198.97 with SMTP id jb1mr14763305lbc.8.1444731458172; Tue, 13 Oct 2015 03:17:38 -0700 (PDT) Received: from [10.0.0.6] ([87.104.236.202]) by smtp.gmail.com with ESMTPSA id bg6sm391972lbc.27.2015.10.13.03.17.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Oct 2015 03:17:37 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: RUTA variable assignment problem From: Mario Gazzo In-Reply-To: <561CCB0C.1020308@averbis.com> Date: Tue, 13 Oct 2015 12:17:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <475FC3CC-BDCD-40A9-84A4-6D0940ADA017@gmail.com> References: <1C21AED0-4FE9-45C5-8303-DE602C6CABB4@gmail.com> <561CCB0C.1020308@averbis.com> To: user@uima.apache.org X-Mailer: Apple Mail (2.2104) Hi Peter, Thank you for answering. I fully understand that you may both be busy = and that systems can come in between sometimes. I am subscribing to the = user list though. Regarding your question. There is only a single MatchedRegexAnnotation = in that example, which is the one that gets assigned to the variable. = There a two variables in the other example I send but they should = reference two different annotations but the CREATE method ends up = assigning the same value to the features. All the issues I had so far of = this type involve the CREATE method, which sometimes appears erratic = about when and how it captures variables and types. When you say "the scope of the match of the rule element" then I like to = understand how you define scope in the different cases. E.g. is a = variable defined in the =E2=80=9Cglobal" script space always visible = also within BLOCK statements? Are all matches of different rule elements = within a BLOCK in the same scope? Is there a clear difference between = scope and any matched annotation context since it seems that variables = can be local when declared in a BLOCK but are they available just = because I match the same area in another BLOCK? I would ideally like to create small executable examples that can = reproduce my problems but I don=E2=80=99t think I get the time this week = anymore. I will keep my line open though and answer any questions you = might have ASAP. Cheers Mario > On 13 Oct 2015, at 11:12 , Peter Kl=C3=BCgl = wrote: >=20 > Hi, >=20 > sorry for the delayed response. I received your mail just yesterday. > Maybe your mail needed to be moderated. Did you subscribe to the user = list? >=20 > Here's a first short answer. I will try to look into it in more = details > if this does not help: >=20 > The CREATE action searches for annotations (that should be assigned to = a > feature) within the scope of the match of the rule element. >=20 > Is there an annotation of the type MatchedRegexAnnotation within the > offsets of the annotation of the type SomeOtherMatch? ... e.g., is > SomeOtherMatch overlapping UniqueMatch? >=20 > Maybe CREATE is not the correct action for you. Unfortunately, for > filling feature for distant annotations there is currently only the > GATHER action. This will hopefully change with ruta 2.4.0. >=20 > I will try to find the time to take a look at your second mail later > this day (or tomorrow). >=20 > Best, >=20 > Peter >=20 >=20 > Am 09.10.2015 um 15:41 schrieb Mario Juric: >> Hi, >>=20 >> I have a annotation type variable that I am assigning a value in a = statement block and then use that value in match rule to set the = attribute in a new annotation like this: >>=20 >> Type myvar; >>=20 >> BLOCK(ForEach) UniqueMatch{} { // Capturing unique scope with this >> =E2=80=9CSome (\\w+) Regex" -> 1 =3D MatchedRegexAnnotation; >> MatchedRegexAnnotation { -> ASSIGN(myvar, = MatchedRegexAnnotation)}; >> } >>=20 >> SomeOtherMatch{} { >> -> CREATE(Markup, =E2=80=9Cmyprop=E2=80=9D =3D myvar) >> }; >>=20 >> The =E2=80=9Cmyprop=E2=80=9D attribute never gets a value even though = the MatchedRegexAnnotation is created. A completely analog = implementation appears to work flawlessly in another context but not in = the current. >>=20 >> I am in the dark about this and my Ruta skills are sill infant so any = idea to what could be the problem is much appreciated. >>=20 >> Cheers >> Mario >=20