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 14960200C23 for ; Wed, 22 Feb 2017 09:24:53 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 131D6160B67; Wed, 22 Feb 2017 08:24:53 +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 3841C160B49 for ; Wed, 22 Feb 2017 09:24:52 +0100 (CET) Received: (qmail 44162 invoked by uid 500); 22 Feb 2017 08:24: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 44150 invoked by uid 99); 22 Feb 2017 08:24:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 08:24:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9B38FC1FE5 for ; Wed, 22 Feb 2017 08:24:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.781 X-Spam-Level: * X-Spam-Status: No, score=1.781 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=aia-es.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jTGr_krpbjh1 for ; Wed, 22 Feb 2017 08:24:48 +0000 (UTC) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8F8F15F1B8 for ; Wed, 22 Feb 2017 08:24:47 +0000 (UTC) Received: by mail-qk0-f173.google.com with SMTP id x71so3258200qkb.3 for ; Wed, 22 Feb 2017 00:24:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aia-es.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=sZ67AMl7Cy3aHfHH6s/4pmJKcbJyQ/0RNSLeuFx43fg=; b=axuX5tOjF6uwtL0Ub+skOeo1y/EICGcUK31AwyPd159a++9E3sJhxwNfRY8KwXZbvq aARfzBE99Jsjttm7lYCBOt7AEWaGYj5zR3781tMvpPhsrVjTnAH2zlTAqZWmAjGvv42q p9fwCgHdosyctwWo7Btm5wUEYC7gJPELkGQD5uaEIxsK8jGyQkMk6MSTD5rPbRQ3xZD4 TXpQAY+OGC3WIw1KchpUaTLjyKcQ5c/6QjJLvJYHKVXbO8HJJPjM553bIMkVTNtyi4wv OWYQ1at7/S3Es3LfsX80WMBuUsLDuOOZKmxBfXuHWXGD5ZaOEsx+R3hSZ0TZV6n0Xwd0 ttaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=sZ67AMl7Cy3aHfHH6s/4pmJKcbJyQ/0RNSLeuFx43fg=; b=ev/+DitKigjenesHWPEIURLimcTai3d7liZJHOdeLBhpbtEY8HLcfI9FMNB9ESNpdQ WhgwBAZkXR7bP12B03RJiFXzORJM3B1bjTkLdJK7cSdP9U+hO++BOqTS8b6GVoF/rTdV OUpwRKPTxAOS2mOytv4u0yhg7EIjHsJZRP+4GYocBA6ALD64lLmUJTzQctlgN8EO/3U7 WQxMeeiwfELeIu/dgq2IKzXfEGLoPKZ1hWuqQO62F7dJn6KihR8whMO6ABpa2J8vhoDk Tb3qgY+WawOLwk8RP70tw9OupYxEuNoxluWRbjyEaecLfHAcbuKoSVr9/B9NR+tCDWI5 5YuQ== X-Gm-Message-State: AMke39lUmtuBjIMegH023PQ9R9jklWfpvF+Md/ObeBAVNzhkRO6zbjccrwQAxSRuz/XbDG/JTX9+C+RmJXW2ciPb X-Received: by 10.233.237.2 with SMTP id c2mr15238026qkg.227.1487751877676; Wed, 22 Feb 2017 00:24:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.130.132 with HTTP; Wed, 22 Feb 2017 00:24:37 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Jos=C3=A9_Vicente_Moyano_Murillo?= Date: Wed, 22 Feb 2017 09:24:37 +0100 Message-ID: Subject: Re: Using RUTA To: user@uima.apache.org Content-Type: multipart/alternative; boundary=001a114f4b3c2eed0e05491a3a99 archived-at: Wed, 22 Feb 2017 08:24:53 -0000 --001a114f4b3c2eed0e05491a3a99 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3D=3D"title", Attribute.ct=3D=3D"Norse Mytho= logy"}" % Attribute{Attribute.name=3D=3D"author", Attribute.ct=3D=3D"Ne= il 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=3D=3D"title", Attribute.ct=3D=3D"Norse Mytho= logy"}" % 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=C3=BCgl : > 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=3D=3D"title", a1.ct=3D=3D"Norse Mythology"} > % a2:Attribute{a2.name=3D=3D"author", a2.ct=3D=3D"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 =3D false, fa =3D false}; > book->{a1:Attribute{a1.name=3D=3D"title", a1.ct=3D=3D"Norse Mythology= "-> > ft=3Dtrue};}; > book->{a2:Attribute{a2.name=3D=3D"author", a2.ct=3D=3D"Neil Gaiman"-> > fa=3Dtrue};}; > book{ft,fa -> NeilsBook}; > } > > > ... or with a BLOCK... > > > BLOCK(book) Book{}{ > Document{-> ft =3D false, fa =3D false}; > a1:Attribute{a1.name=3D=3D"title", a1.ct=3D=3D"Norse Mythology"-> ft= =3Dtrue}; > a2:Attribute{a2.name=3D=3D"author", a2.ct=3D=3D"Neil Gaiman"-> fa=3Dt= rue}; > 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=3D=3D"title", a1.ct=3D=3D"Norse Mythology"} > # a2:Attribute{a2.name=3D=3D"author", a2.ct=3D=3D"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=C3=A9 Vicente Moyano Murillo: > > Hello everyone > > > > I'm planning to use RUTA to create some annotations. But i'm not able t= o > > 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 featur= e > " > > *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: "Nors= e > > Mythology > > gaiman/1124023596;jsessionid=3DFD1D8F9690602616CA59B38CFE9290 > 06.prodny_store02-atgap08?ean=3D9780393609097> > > " > > 2.- *Attribute* with name feature equals "author" -> covered text: "Ne= il > > 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: "Neve= r > > Never > > jsessionid=3DFD1D8F9690602616CA59B38CFE929006.prodny_store02-atgap08?ean= =3D > 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 > > > > --001a114f4b3c2eed0e05491a3a99--