From user-return-7576-apmail-uima-user-archive=uima.apache.org@uima.apache.org Wed May 31 11:27:07 2017 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 D44D619A66 for ; Wed, 31 May 2017 11:27:07 +0000 (UTC) Received: (qmail 26886 invoked by uid 500); 31 May 2017 11:27:07 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 26834 invoked by uid 500); 31 May 2017 11:27:07 -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 26814 invoked by uid 99); 31 May 2017 11:27:07 -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, 31 May 2017 11:27:07 +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 E34A7CD3D8 for ; Wed, 31 May 2017 11:27:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.022 X-Spam-Level: X-Spam-Status: No, score=-5.022 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled 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 p8cqTE60ws0K for ; Wed, 31 May 2017 11:27:04 +0000 (UTC) Received: from iron02.fraunhofer.de (iron02.fraunhofer.de [153.96.1.56]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 156615F5B4 for ; Wed, 31 May 2017 11:27:04 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2G3BQBxpy5Z/xoBYJldGwEBAQMBAQEJAQEBg1VigQ2DcpwHkxiELRsoJ4V9AoJdVwECAQEBAQECA2gogmEERikDAQEBAQEBAQEBAQEBAQEBAQEBAQEBARYBAQEBAQEBAQEBAQEBAQEaAggFJiAYAQQBIwQRRgsLGgImAgJXEwYCAQGKHgcBBAELq3uBbDqLUQEKAQEBJIELhVaBYCuCdIMAgToSARxMgkaCYAWJQIhEhHWHKnmBF4UQjAiLBgWGbJROWH8LMCEkhV0cgWV0AQEBhyKCLgEBAQ X-IPAS-Result: A2G3BQBxpy5Z/xoBYJldGwEBAQMBAQEJAQEBg1VigQ2DcpwHkxiELRsoJ4V9AoJdVwECAQEBAQECA2gogmEERikDAQEBAQEBAQEBAQEBAQEBAQEBAQEBARYBAQEBAQEBAQEBAQEBAQEaAggFJiAYAQQBIwQRRgsLGgImAgJXEwYCAQGKHgcBBAELq3uBbDqLUQEKAQEBJIELhVaBYCuCdIMAgToSARxMgkaCYAWJQIhEhHWHKnmBF4UQjAiLBgWGbJROWH8LMCEkhV0cgWV0AQEBhyKCLgEBAQ X-IronPort-AV: E=Sophos;i="5.38,423,1491256800"; d="scan'208";a="78656524" Received: from mail-mtaka26.fraunhofer.de ([153.96.1.26]) by iron02.fraunhofer.de with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 31 May 2017 13:26:57 +0200 X-IronPort-AV: E=Sophos;i="5.38,423,1491256800"; d="scan'208";a="238934171" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from kso.scai.fraunhofer.de ([193.175.167.130]) by mail-mtaka26.fraunhofer.de with SMTP; 31 May 2017 13:26:56 +0200 Received: from ksi.scai.fraunhofer.de (ksi.scai.fraunhofer.de [129.26.128.4]) by kso.scai.fraunhofer.de (Postfix) with SMTP id 451C81200A4 for ; Wed, 31 May 2017 13:26:56 +0200 (CEST) Received: from [129.26.131.10] (lebesgue.scai.fraunhofer.de [129.26.131.10]) by ksi.scai.fraunhofer.de (Postfix) with ESMTP id A64D83FF2B for ; Wed, 31 May 2017 13:26:55 +0200 (CEST) Subject: Re: UIMA Ruta use of features in a block statement To: user@uima.apache.org References: <2146449917.2945085.1496151331791.JavaMail.zimbra@scai.fraunhofer.de> <1dec92a8-13a0-beb4-bc30-3f056227d693@averbis.com> <1928343073.2947554.1496155059954.JavaMail.zimbra@scai.fraunhofer.de> <2baef45a-0269-af9a-6fb1-48f8af8d992f@scai.fraunhofer.de> From: Sumit Madan Organization: Fraunhofer SCAI Message-ID: <589e4bad-cec6-e344-f12f-bff84a16f0fa@scai.fraunhofer.de> Date: Wed, 31 May 2017 13:26:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Am 31.05.2017 um 09:59 schrieb Peter Kl=C3=BCgl: > Hi, Hi Peter, > Am 30.05.2017 um 19:35 schrieb Sumit Madan: >> We were not able to access the annotation within the BLOCK. >> >> ### >> STRING s; >> BOOLEAN a ; >> >> // This is not working for us: >> BLOCK(forEACH) Lemma{}{ >> Lemma{->MATCHEDTEXT(s), ASSIGN(a,contains(s,"er"))}; >> Lemma{a ->Test1}; >> } >> >> // This is working: >> BLOCK(forEACH) Lemma{}{ >> W{->MATCHEDTEXT(s), ASSIGN(a,contains(s,"er"))}; >> W{a ->Test2}; >> } >> >> // This is also working: >> BLOCK(forEACH) Lemma{}{ >> Document{->MATCHEDTEXT(s), ASSIGN(a,contains(s,"er"))}; >> Document{a ->Test3}; >> } >> ### >> > All three examples should work. Which ruta version do you use? It looks > like a bug. Lisa is testing again and will get back to you. > >> >> We weren't aware that we can use contains() as a condition too. I >> think the documentation [1] doesn't describe that String functions >> with return value boolean can be used as conditions. I think one can >> assume if you see the source code (public class >> ContainsBooleanFunction extends BooleanFunctionExpression) under [2]. >> >> [1] https://uima.apache.org/d/ruta-current/tools.ruta.book.html >> [2]: >> https://github.com/apache/uima-ruta/blob/trunk/ruta-core-ext/src/main/= java/org/apache/uima/ruta/string/bool/ContainsBooleanFunction.java >> > Thank, I'll extend the documentation. Thank you! > Hmm, I do not know, this sounds all correct. Did you switch the CAS vie= w > in the CAS Editor? It's working now. The commit, which activated the second debug option,=20 was not included on our developement environment. That's why the views=20 were empty. The views are very helpful to get an fast overview over the=20 failed and matched rules. > Best, > > Peter --=20 Mit freundlichem Gru=C3=9F / Best regards Sumit Madan, M.Sc. Wissenschaftlicher Mitarbeiter / Research fellow Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI) Department of Bioinformatics Schloss Birlinghoven D-53754 Sankt Augustin Room: C3-242 Tel.: +49 2241 14 2997 Email: sumit.madan@scai.fraunhofer.de Internet: http://www.scai.fraunhofer.de/