From user-return-7858-archive-asf-public=cust-asf.ponee.io@uima.apache.org Sun Feb 25 16:57:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 454CC18064C for ; Sun, 25 Feb 2018 16:57:10 +0100 (CET) Received: (qmail 22052 invoked by uid 500); 25 Feb 2018 15:57:09 -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 22035 invoked by uid 99); 25 Feb 2018 15:57:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Feb 2018 15:57:08 +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 084FE180161 for ; Sun, 25 Feb 2018 15:57:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mazancourt-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id YGj5EGILj47E for ; Sun, 25 Feb 2018 15:57:03 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 6D2615F5FA for ; Sun, 25 Feb 2018 15:57:02 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id t74so13088717wme.3 for ; Sun, 25 Feb 2018 07:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mazancourt-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=rDb6XOx764V0FsgP5zbSEoUz2zgi3qN3GVJl9L9hy4A=; b=qcsHx37+i5iRpwCM8XDfhzRgenpNByOLYkbzjtTUxbCVm/BblpgJpvs26DHFU1HoJY jDnSTwNqkzhx7Bst/q3Vy0F3ZOJLDJvY8VxY0zulNQQlvG6eYCqD9Z1fLoUUMC0Bw3c+ ZnQ3JQQ//nLnI2266oL0cBE1n8wMGBP+3a8Q9VIlAcPGZQQgLtKT68cIWJIDSZQ0J5df Ap5aPh6vi1j88TARfx4CnmH8T8Y30jhV+XrQxMXzIDdcejaVH9ralJbFXoEeeLLJpOlg PuLoXyba4pMKzBXoFNGKAQvXOz7XDJddnLoRf6GOnnpIMY+An4hLGKySi56PMmbsAUxb PdEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=rDb6XOx764V0FsgP5zbSEoUz2zgi3qN3GVJl9L9hy4A=; b=CrBDKu4ynRjSxsMbdnh4e0rLeDhelPpJmHo5gNh+/ejbTedeVxv3onMvJF7sCMa3pY etvIlMCU/jv28GYZblACA8Z3GqZIURQa5v/wQwZbQ7dYn8Nx9P+j9ujU61kC8jrn7gAu 6ipE0fltyYCuuzSW/MKOTLK9tD6qPQSxrKjk5z7uwrCrE4Pg9D8ifbWEe1r/lhIbbPG8 dfQlP4MHEq0co/YAK/7G+LV2N9kvuqILgkl8lOftjvwzPEZlLUzwc4c/xTCxdFxeQ9u9 PAU79tJ0wpOD092bWgSCABGNh2oLQmMe0i09vTVP9CEDlEx0tN9ZHNGkmxpc1EgFyQvm 2qTw== X-Gm-Message-State: APf1xPADG9WYeRAuXdeX23ycT0qjqZMF1OBBCAFOT8zECxS4Rd9jRmEn vzntwLm55O3YeNWEXHQRsaGzfXzOQiI= X-Google-Smtp-Source: AG47ELtkH2o5R9mMlR4bB9mSp8SoALTJznbpE+qfWIgIJTpOossr0wvwdkaZOcWSBHYd3vcjQOz7dw== X-Received: by 10.28.111.145 with SMTP id c17mr3564240wmi.74.1519574221758; Sun, 25 Feb 2018 07:57:01 -0800 (PST) Received: from pc20.home (ARouen-655-1-267-194.w82-126.abo.wanadoo.fr. [82.126.70.194]) by smtp.gmail.com with ESMTPSA id 59sm2063866wro.57.2018.02.25.07.56.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 07:57:00 -0800 (PST) From: Hugues de Mazancourt Content-Type: multipart/alternative; boundary="Apple-Mail=_7120C787-922D-4102-8CF6-B5082593E4FC" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Lost in UIMA Ruta Workbench ! Date: Sun, 25 Feb 2018 16:56:57 +0100 References: To: user@uima.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.5.20) --Apple-Mail=_7120C787-922D-4102-8CF6-B5082593E4FC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, The point is that the MARK action simply creates an annotation without = any features. Reading your code, it seems that you expect the matched = value to be held in the =C2=AB value =C2=BB feature. This is not the = case. You can access to the text that is covered by an annotation through the = pseudo-feature =C2=AB .ct =C2=BB (as coveredText). Thus I guess the following rule should do what you want (not tested) : Document{-> CREATE(INTENT, "value" =3D = "Apply_for_Card")}<-{e:ENTITY{e.ct=3D=3D"card"} # = a:ACTIONS{a.ct=3D=3D"application"};}* ;}* But I guess that you will want to capture variations, such as plurals = (card/cards) or even derivation (apply/application). Then you should have a look at MARKTABLE action, which will take as a = resource a CSV file with the text to be matched in the input document = and as many features as you want to be created on the annotation. Thus = you could describe dictionary entries with your variations, all of them = mapping to a normalized value. Keep trying, Ruta is a little bit tricky at start, but it=E2=80=99s = worth the effort. Best regards,=20 Hugues de Mazancourt http://www.mazancourt.com twitter: @mazancourt > Le 23 f=C3=A9vr. 2018 =C3=A0 17:30, Anna Polychroniou = a =C3=A9crit : >=20 > Hello, > I am trying to complete an exercise in NLU using UIMA Ruta. > I have hit a wall for the last 3 days. > I would be grateful if you could give a hint on my issue: >=20 > I want to create 2 annotations ENTITY and ACTIONS for a list of = sentences. > I define a list of words for each one. > Then I want to create a third annotation (INTENT) based on the first = 2. > Different values of ENTITY and ACTIONS must combine the 10 different = values > of INTENT annotation. >=20 > I 've stuck on the final step where I have to create the combined > annotation (with bold). > Could you please help? > I attach my work below. >=20 >=20 >=20 > PACKAGE uima.ruta.exercise; >=20 >=20 > WORDLIST EntityList =3D "Entities.txt"; > WORDLIST ActionList =3D "Actions.txt"; > DECLARE Annotation ENTITY(STRING value); > DECLARE Annotation ACTIONS(STRING value); >=20 >=20 > Document{-> RETAINTYPE(BREAK)}; > DECLARE Sentence; > BREAK #{->MARK (Sentence)} BREAK; >=20 > DECLARE Annotation INTENT(STRING value); > BLOCK(ForEach) Sentence{} { > Document{-> MARKFAST(ENTITY, EntityList)}; > Document{-> MARKFAST(ACTIONS, ActionList)}; >=20 > *Document{-> CREATE(INTENT, "value" =3D > "Apply_for_Card")}<-{e:ENTITY{e.value=3D=3D"card"} # > a:ACTIONS{a.value=3D=3D"application"};}* > *;}* >=20 >=20 >=20 >=20 > Thank you, > Anna --Apple-Mail=_7120C787-922D-4102-8CF6-B5082593E4FC--