Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BCBFF200C29 for ; Tue, 28 Feb 2017 15:44:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BB5A6160B7C; Tue, 28 Feb 2017 14:44:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B8564160B6A for ; Tue, 28 Feb 2017 15:44:54 +0100 (CET) Received: (qmail 45656 invoked by uid 500); 28 Feb 2017 14:44:53 -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 45644 invoked by uid 99); 28 Feb 2017 14:44:53 -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; Tue, 28 Feb 2017 14:44:53 +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 2BA37C094B for ; Tue, 28 Feb 2017 14:44:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.101 X-Spam-Level: X-Spam-Status: No, score=-0.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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 GoMNdjBmJcX4 for ; Tue, 28 Feb 2017 14:44:50 +0000 (UTC) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4EDEE61595 for ; Tue, 28 Feb 2017 14:44:50 +0000 (UTC) Received: by mail-wr0-f170.google.com with SMTP id g10so10332220wrg.2 for ; Tue, 28 Feb 2017 06:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=PWBvxS12c9VS/fq+TszEn5kDjWocr/GM5T6IRKuLSKY=; b=KOlXq/X6nr6DEsCwvl+YFzTCExFmI3XBBmxewUiHLK248nA6JvTPS96thdKgEKFFjf O0CatZf0OOLNZC5rZa0f+CYxmCaRQoBFd21Klu8PwcybgU0Qyk5OyjIdvmwCyZ86yXpe Sd80Gt8wuQB6aJMcYF9Ba70KXN04rT4FDSj9UaZiUktEKfgZV6oyqyFy86qhonUHsg7b zTJjSpYeq+4VAoWzfvEVk3LIyz/sSqjaB2aIjB4diVZCQU/I6y17CuIO80MMg+rvvUcP iNFzfqvNCwaEI0a0pZiAgroqwMJEIj3pg9/Qq8eh0l8r2Y8cvH9PV6BtJwdrnO1CZDor pYgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=PWBvxS12c9VS/fq+TszEn5kDjWocr/GM5T6IRKuLSKY=; b=YJsHIIKFSJOQj/0vU6KsYbrQE/21Gz1YlI61LJgbvfUUGPKDvpPm+VTcIaxD9vTxHE MrFbsMPyPMfS7WmW6CruiOvYg9+Hz5/5j/6jpkCrbfMx2RVMw+LjWB3CvBAE1DpB2SH9 Z/ndNR2QADSDggpTXpVE1WLFzZnFmWMH2/hxl5Vcpy0gwvNckhGiWUHtgGdHW7YbGcLu Z4jqdDyAi6iA7dFBED+2u+C/dTnhv+rxp7S2fmCZkhmxvPa0KfoWtGE8mU4BBGBGmkwe XPiubb0IQuXGw+AFT8YOpiCBGnPE1HdHwGwC4uPQirpjtEkwbF1kjleUKB+mJVBCte9N Pa+A== X-Gm-Message-State: AMke39nrgyDmjRPo35TX/TwdGcIQmfJ3bGv4VrfcwnPNV0oH4yV//+w1AEmKvuBucSJTGA== X-Received: by 10.223.150.10 with SMTP id b10mr2654724wra.98.1488293087716; Tue, 28 Feb 2017 06:44:47 -0800 (PST) Received: from [192.168.11.108] (port-212-60-243-34.static.qsc.de. [212.60.243.34]) by smtp.gmail.com with ESMTPSA id j184sm18446793wmd.31.2017.02.28.06.44.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 06:44:47 -0800 (PST) Subject: Re: Using RUTA To: user@uima.apache.org References: <64dc83e5-e21f-bc71-7668-899338f86d2d@averbis.com> <78958a00-8a4b-bb1a-f35e-744ea20a6aae@averbis.com> <55b16bd5-5652-6fe3-dfb9-b2c27c2a37dd@averbis.com> <76e1101d-e762-0fe4-ee0a-875a7a8b7b0d@averbis.com> From: Peter Kluegl Message-ID: <4d9d61ca-b19e-d746-486c-e3958f8dba25@gmail.com> Date: Tue, 28 Feb 2017 15:44:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit archived-at: Tue, 28 Feb 2017 14:44:55 -0000 hmmm ok, maybe my example for testing the rule was too simple. I will create a more complex example and check the results Peter Am 28.02.2017 um 15:38 schrieb José Vicente Moyano Murillo: > Hi Peter, > > I'm sorry but this example does not work properly. It seems that it is a > problem regarding conjunction rules (%) > > This is our test case and result. > > We have a book with 5 attributes > - name > - author > - pages > - ISBN > - Category > > The rule is validatin name and author. > > RUTA creates the annotation with the list but the list contains 20 times > the las attribute (Category). > > If we use # it works perfectly. But in general we must use % > > May be this information will help you. > > Many thanks > > > > 2017-02-28 14:23 GMT+01:00 Peter Kluegl : > >> Hi, >> >> >> operations directly on lists and arrays are on my todo list but not yet >> implemented. >> >> >> Right now, there are still some options like a variable or restricted >> assignments. >> >> >> Here's an example with an ANNOTATIONLIST variable: >> >> >> ANNOTATIONLIST list; >> Book{-> CREATE(NeilsBook, "attributes" = list)}<-{ >> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology" -> >> ADD(list,a1)} >> % a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman" -> >> ADD(list,a2)}; >> }; >> >> >> Variables are global, so you need to clear the list maybe somewhere, >> e.g. before the first ADD. >> >> >> In the current trunk, something like the following is also possible: >> >> Book{-> NeilsBook("attributes" = Attribute{OR(Attribute >> .name=="title", Attribute.name=="author")})}.... >> >> >> Best, >> >> >> Peter >> >> >> Am 28.02.2017 um 14:06 schrieb José Vicente Moyano Murillo: >>> Hi Peter, we have another question regarding the same example. >>> >>> Right now all is working properly (many thanks) and it seems that >>> 2.5.1-SNAPSHOT it's fine. >>> >>> Now we are planning to store some information in the created annotation. >> We >>> want to store all the attributes that matches the RUTA rule. >>> >>> It is possible to store a1 and a2 in a feature (attributes) of NeilsBook? >>> >>> The example: >>> >>> Book{-> NeilsBook}<-{ >>> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"} >>> % >>> a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"}; >>> }; >>> >>> We are using this aproach: >>> >>> Book{-> NeilsBook("attributes" = Attribute )}<-{ >>> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"} >>> % >>> a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"}; >>> }; >>> >>> This example works but it is storing all the annotations "Attribute" >>> covered by "Book" and we just want the attributes that matches the rule. >>> >>> Thanks in advance. >>> >>> >>> >>> >>> 2017-02-24 10:29 GMT+01:00 José Vicente Moyano Murillo : >>> >>>> Many thanks Peter ¡¡¡ >>>> >>>> 2017-02-24 9:46 GMT+01:00 Peter Klügl : >>>> >>>>> Hi, >>>>> >>>>> >>>>> the repo: >>>>> >>>>> >>>>> apache.snapshots >>>>> Apache Snapshot Repository >>>>> http://repository.apache.org/snapshots >>>>> >>>>> false >>>>> >>>>> >>>>> >>>>> >>>>> the folder: >>>>> >>>>> https://repository.apache.org/content/groups/snapshots/org/a >>>>> pache/uima/ruta-core/2.5.1-SNAPSHOT/ >>>>> >>>>> >>>>> Best, >>>>> >>>>> Peter >>>>> >>>>> >>>>> >>>>> Am 23.02.2017 um 13:47 schrieb José Vicente Moyano Murillo: >>>>>> Hi, >>>>>> >>>>>> ruta-core.jar it's enough. >>>>>> >>>>>> It will be fantastic if i could access the snapshot repository. >>>>>> >>>>>> 2017-02-23 13:03 GMT+01:00 Peter Klügl : >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> >>>>>>> what do you need? Only ruta-core.jar or also the Eclipse >> plugins/update >>>>>>> site? >>>>>>> >>>>>>> I will prepare a new RC for the next release soon. >>>>>>> >>>>>>> There should be snapshot artifacts built by jenkins in the snapshot >>>>>>> repository. I am out-of-office today so do not have the link right >>>>> now. (If >>>>>>> you want to build it yourself, the svn source repo can be accessed by >>>>>>> anyone) >>>>>>> >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> >>>>>>> Peter >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Am 23.02.2017 um 08:06 schrieb José Vicente Moyano Murillo: >>>>>>> >>>>>>>> Hi Peter, good morning. >>>>>>>> >>>>>>>> Have we any opportunity to get a fixed version? I mean a snapshot or >>>>> an >>>>>>>> access to the repo. >>>>>>>> >>>>>>>> Regards >>>>>>>> >>>>>>>> 2017-02-22 10:38 GMT+01:00 José Vicente Moyano Murillo < >>>>> moyanoj@aia.es>: >>>>>>>> you're right >>>>>>>>> % is performing some kind of "or". >>>>>>>>> >>>>>>>>> So we will wait for the new release. >>>>>>>>> >>>>>>>>> Many thanks >>>>>>>>> >>>>>>>>> 2017-02-22 9:54 GMT+01:00 Peter Klügl : >>>>>>>>> >>>>>>>>> I actually wonder why your rules work. I am quite sure that they >>>>> match >>>>>>>>>> too often, i. e. they match also if only one of the conjunct rule >>>>>>>>>> elements match. >>>>>>>>>> >>>>>>>>>> You can simply try that by using a wrong string in the check like >>>>> "NG" >>>>>>>>>> instead of "Neil Gaiman" >>>>>>>>>> >>>>>>>>>> Anyways, the problem will be fixed in a few minutes and will be >>>>> part of >>>>>>>>>> the next release. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Best, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Peter >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Am 22.02.2017 um 09:38 schrieb Peter Klügl: >>>>>>>>>> >>>>>>>>>>> Thanks. Maybe its just a bug in 2.5.0 I already fixed. I'll >>>>> investigate >>>>>>>>>> it. >>>>>>>>>> >>>>>>>>>>> Am 22.02.2017 um 09:24 schrieb José Vicente Moyano Murillo: >>>>>>>>>>> >>>>>>>>>>>> Thank you very much Peter. Your advice was amazing. >>>>>>>>>>>> >>>>>>>>>>>> We tried the first option using Conjunct rules and as you said >> it >>>>> does >>>>>>>>>>> not >>>>>>>>>>> work with version 2.5.0. But we change a little your example and >> it >>>>>>>>>>> works >>>>>>>>>>> perfectly witn 2.4.0 and 2.5.0 >>>>>>>>>>>> We use theses examples with success: >>>>>>>>>>>> >>>>>>>>>>>> DECLARE Annotation RuleDetection; >>>>>>>>>>>> Book{ -> CREATE(NeilsBook) } <- { >>>>>>>>>>>> Attribute{Attribute.name=="title", Attribute.ct=="Norse >>>>>>>>>>>> >>>>>>>>>>> Mythology"}" >>>>>>>>>>> % >>>>>>>>>>>> Attribute{Attribute.name=="author", >>>>>>>>>>>> Attribute.ct=="Neil >>>>>>>>>>>> Gaiman"};" >>>>>>>>>>>> }; >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> DECLARE Annotation RuleDetection; >>>>>>>>>>>> Book{ -> CREATE(NeilsBook) } <- { >>>>>>>>>>>> Attribute{FEATURE("name","title"), FEATURE("ct", "Norse >>>>>>>>>>>> >>>>>>>>>>> Mythology")}" >>>>>>>>>>> % >>>>>>>>>>>> Attribute{FEATURE("name","author"), >> FEATURE("ct", >>>>>>>>>>>> "Neil >>>>>>>>>>>> Gaiman")}; >>>>>>>>>>>> }; >>>>>>>>>>>> >>>>>>>>>>>> DECLARE Annotation RuleDetection; >>>>>>>>>>>> Book{ -> CREATE(NeilsBook) } <- { >>>>>>>>>>>> Attribute{Attribute.name=="title", Attribute.ct=="Norse >>>>>>>>>>>> >>>>>>>>>>> Mythology"}" >>>>>>>>>>> % >>>>>>>>>>>> Attribute{FEATURE("name","author"), >> FEATURE("ct", >>>>>>>>>>>> "Neil >>>>>>>>>>>> Gaiman")}; >>>>>>>>>>>> }; >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> May be the problem is with when we use Identifiers: >>>>>>>>>>>> a1:Attribute and a2:Attribute >>>>>>>>>>>> >>>>>>>>>>>> In any case thank you very much for your help. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2017-02-21 17:46 GMT+01:00 Peter Klügl < >> peter.kluegl@averbis.com >>>>>> : >>>>>>>>>>>> Hi, >>>>>>>>>>>>> I'd normally say that you need the conjunt rules construct to >>>>> specify >>>>>>>>>>>> an >>>>>>>>>>> AND between two rule element independent of the position: >>>>>>>>>>>>> Book{-> NeilsBook}<-{ >>>>>>>>>>>>> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"} >>>>>>>>>>>>> % a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"}; >>>>>>>>>>>>> }; >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> However, I just noted that there is a problem with conjunct >>>>> rules. I >>>>>>>>>>>>> haven't used it in a long time and the test coverage much lower >>>>> than >>>>>>>>>>>> the >>>>>>>>>>> other constructs. I'll create a ticket for it and fix it. >>>>>>>>>>>>> Without conjunct rules, you need some boolean variables for >>>>> cheking >>>>>>>>>>>> the >>>>>>>>>>> AND, which looks all but declarative: >>>>>>>>>>>>> BOOLEAN ft, fa; >>>>>>>>>>>>> FOREACH(book) Book{}{ >>>>>>>>>>>>> book{-> ft = false, fa = false}; >>>>>>>>>>>>> book->{a1:Attribute{a1.name=="title", a1.ct=="Norse >>>>>>>>>>>>> Mythology"-> >>>>>>>>>>>>> ft=true};}; >>>>>>>>>>>>> book->{a2:Attribute{a2.name=="author", a2.ct=="Neil >>>>> Gaiman"-> >>>>>>>>>>>>> fa=true};}; >>>>>>>>>>>>> book{ft,fa -> NeilsBook}; >>>>>>>>>>>>> } >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ... or with a BLOCK... >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> BLOCK(book) Book{}{ >>>>>>>>>>>>> Document{-> ft = false, fa = false}; >>>>>>>>>>>>> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"-> >>>>>>>>>>>>> >>>>>>>>>>>> ft=true}; >>>>>>>>>>> a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"-> >>>>> fa=true}; >>>>>>>>>>>>> Document{ft,fa -> NeilsBook}; >>>>>>>>>>>>> } >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> If the order of the attributes is known, you can avoid the AND >>>>> check >>>>>>>>>>>> and >>>>>>>>>>> just specify a sequential constraint: >>>>>>>>>>>>> Book{-> NeilsBook}<-{ >>>>>>>>>>>>> a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"} >>>>>>>>>>>>> # a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"}; >>>>>>>>>>>>> }; >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> If you need to check on the complete title with the URL, you >> can >>>>>>>>>>>> replace >>>>>>>>>>> the coveredText comparison with a REGEXP condition. >>>>>>>>>>>>> (tested with UIMA Ruta 2.5.0) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Best, >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Peter >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Am 21.02.2017 um 13:58 schrieb José Vicente Moyano Murillo: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hello everyone >>>>>>>>>>>>>> >>>>>>>>>>>>>> I'm planning to use RUTA to create some annotations. But i'm >> not >>>>>>>>>>>>> able to >>>>>>>>>>> accomplish my objective. >>>>>>>>>>>>>> This is my case right now: >>>>>>>>>>>>>> >>>>>>>>>>>>>> I have a text annotated with some annotations "*Book*". >>>>>>>>>>>>>> >>>>>>>>>>>>>> Under "*Book*" annotation i have a few annotations >> "*Attribute*" >>>>>>>>>>>>>> that >>>>>>>>>>>>>> stores some information about the book. Each "*Attribute*" >> has a >>>>>>>>>>>>> feature >>>>>>>>>>> " >>>>>>>>>>>>>> *name*" and a feature "*parent*" to its parent (one "*Book*" >>>>>>>>>>>>>> >>>>>>>>>>>>> annotation). >>>>>>>>>>> And example could be a text with 2 "*Book*" annotations: >>>>>>>>>>>>>> "*Book*" annotation number 1 with 3 nested attributes >>>>>>>>>>>>>> 1.- *Attribute* with name feature equals "title" -> covered >>>>> text: >>>>>>>>>>>>> "Norse >>>>>>>>>>> Mythology >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> gaiman/1124023596;jsessionid=FD1D8F9690602616CA59B38CFE9290 >>>>>>>>>>>>> 06.prodny_store02-atgap08?ean=9780393609097> >>>>>>>>>>>>> >>>>>>>>>>>>>> " >>>>>>>>>>>>>> 2.- *Attribute* with name feature equals "author" -> covered >>>>> text: >>>>>>>>>>>>> "Neil >>>>>>>>>>> Gaiman" >>>>>>>>>>>>>> 3.- *Attribute* with name feature equals "language" - > >> covered >>>>>>>>>>>>>> text: >>>>>>>>>>>>>> "English" >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "*Book*" annotation number 2 with 3 nested attributes >>>>>>>>>>>>>> 1.- *Attribute* with name feature equals "title" -> covered >>>>> text: >>>>>>>>>>>>> "Never >>>>>>>>>>> Never >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> /1123863634; >>>>>>>>>>> jsessionid=FD1D8F9690602616CA59B38CFE929006.prodny_store02- >>>>>>>>>>>> atgap08?ean= >>>>>>>>>>> 9780316433174> >>>>>>>>>>>>>> " >>>>>>>>>>>>>> 2.- *Attribute* with name feature equals "author" -> covered >>>>> text: >>>>>>>>>>>>> "James >>>>>>>>>>>>> >>>>>>>>>>>>>> Patterson" >>>>>>>>>>>>>> 3.- *Attribute* with name feature equals "language" - > >> covered >>>>>>>>>>>>>> text: >>>>>>>>>>>>>> "English" >>>>>>>>>>>>>> >>>>>>>>>>>>>> I need to respect this schema but i have this question: >>>>>>>>>>>>>> It is possible to create and annotation over a book for a >> given >>>>>>>>>>>>> author >>>>>>>>>>> name >>>>>>>>>>>>>> and a given title name? >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank's in advance >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>