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 C498A18647 for ; Wed, 18 Nov 2015 08:25:14 +0000 (UTC) Received: (qmail 33297 invoked by uid 500); 18 Nov 2015 08:25:14 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 33247 invoked by uid 500); 18 Nov 2015 08:25:14 -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 33236 invoked by uid 99); 18 Nov 2015 08:25:14 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 08:25:14 +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 C54D1180A4D for ; Wed, 18 Nov 2015 08:25:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.98 X-Spam-Level: X-Spam-Status: No, score=0.98 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled 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 gkY0432w3GTw for ; Wed, 18 Nov 2015 08:25:12 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id B90F420EBA for ; Wed, 18 Nov 2015 08:25:11 +0000 (UTC) Received: from [192.168.11.108] ([132.230.176.14]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0MV0vp-1ZrYyY0yMv-00YPkO for ; Wed, 18 Nov 2015 09:25:11 +0100 Subject: Re: How to use string functions from ruta-core-ext in Ruta To: user@uima.apache.org References: <564AE40A.3000702@averbis.com> From: =?UTF-8?Q?Peter_Kl=c3=bcgl?= Message-ID: <564C363A.6070704@averbis.com> Date: Wed, 18 Nov 2015 09:26:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:RlnAsAeETP49Jpl1EMnq/LWtHz6SEAIwcrrSZ9/bTEoixxuej2f ZoprGPpz4coOkTo7tBkebZ6iP2YLWQYa3ScvoSHaMPGMRw46PxW5ZWTw6Or6dkZG7KSnSaE aUzEyMvYKsDwfN2cMYYTzwQw15KU2t7RzwCFea5M5PFpToKWkua5IolSOuLBX2uDpLoWEb5 6UIWd/KGEwS0XOOxYOHlQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:LkHQyb+/Cg8=:VSWOcXfZhMhXaa++6rG9oD km57igDD4YqrSdmUu5nxzA22afWKXs6J9ASzS/ec1M6stbuhaed9w0x8VSPHZqPOMtVGGw3um inO+/OguCLNLYApF6OAExOOWmLMr7TqDi8MF+j7HqWRCT+0oHAv+21h/Ul92Md826KzRuchaj woeOPhv1LWpTcLK7B80JCcoVPDaKvvgGQ7CbJ7CBWlFiaYm7ulNYZ2duBo5icJjnnwFzixm+j rkSPwtW5RF9oIkbzEcOIe5gNb8UlDeSKWa95EUgaTFYQZzH87h1AXprMPeD4l9sXV1kC/sQfQ ssU0YdkwVOwvTg5MTXkO1sFuy2S83gJkKZJxccaTAjUUPksglXXd8bgbK/Su4W8nlK4AZmE4M nbG2UESFSYFWHy8UJM4WOMBwkrrjGjtnWoLsuB/oj2Y/XkBamqOemt3ovAfHObUVjhBGL1Xeu C6XD2Qi91Rj6Vbfty6X+i/Auv13TMZFcuuac81oUAKfH9cQA3h65q6p+Rkl/stz0eiH4Hbwn8 6nd7SO0RKimXPu9YWYry+LZ+C5pKN9ZjY6P3X3Kc5Np7dJo9OYG9pWuCbSFgMwB3+4Anl6u0B ZTxmEqRFPxtkfBpPEczLludl0DjtwFtoiPTGrU6WSmuOytTybBQm5M/9awnkg4amMh5QrI9ka CBZVyIMdX4+EM1+DQNXWP/A0PMIbDsqfBZlR4cAIlLxgj7dOLse/ODLCAyIlwYhyQzhIHjR4i tlmUgxt9GViZ//0s Hi, I must admit that I did not realize that this is an example from the documentation. This is either a good sign that there are many examples or a bad one that I do not even know what is documented... I am afraid that this is not the last error in the documentation, but we work on improving it steadily. Thanks for poiting it out! I fixed it :-) Best, Peter Am 18.11.2015 um 08:51 schrieb Wolf-Dietrich Materna: > Hi Peter, > thank you very much for your quick reply. Indeed, the example does work with the fixed offset. > Although it's a minor issue, you might consider fixing the example in the Ruta documentation. > > It was confusing, that even the simple example from the documentation didn't work, > while examine a problem in our application using the string function from the ruta extension jar. > Thank you again. > > Best regard, > Wolf-Dietrich Materna > > -----Urspr�ngliche Nachricht----- > Von: Peter Kl�gl [mailto:peter.kluegl@averbis.com] > Gesendet: Dienstag, 17. November 2015 09:24 > An: user@uima.apache.org > Betreff: Re: How to use string functions from ruta-core-ext in Ruta > > Hi, > > it should work just fine (tested with current trunk). > > The substring function like the other string functions just delegate to the java methods. Thus, the substring from 0 to 8 returns "Alexande". > The example should work with : CW{-> MATCHEDTEXT(s), ADD(sl, substring(s,0,9))}; > > Best, > > Peter > > Am 17.11.2015 um 09:05 schrieb Wolf-Dietrich Materna: >> Hi, >> >> I'd like to use the Ruta string functions referenced in the user guide >> here: >> https://uima.apache.org/d/ruta-2.3.0/tools.ruta.book.html#ugr.tools.ru >> ta.language.extensions.core-ext.stringfunctions >> >> The problem is, they don't work out of the box in the Ruta Workbench 2.3.1 with Eclipse 4.4.2. I've set up a new Ruta project with a script containing the (slightly modified) code from the substring example: >> >> DECLARE Test; // I've added this line to make the example work. >> STRING s; >> STRINGLIST sl; >> CW{-> MATCHEDTEXT(s), ADD(sl, substring(s,0,8))}; >> CW{INLIST(sl) -> Test}; // Changed SW to CW to make the rule work. >> >> The input file only contains two words, "Alexanderplatz" and "Alexander". What I expected was that the first rule finds "Alexanderplatz" and stores the first nine letters of it in the string list sl so that the last line can annotate "Alexander" with "Test". In reality, however, nothing happens. I get no error message, but after execution, there is no "Test" annotation. >> >> Is there some additional configuration needed to access these string functions? >> >> Any help would be appreciated. >> >> Best Regards, >> Wolf-Dietrich Materna >> >>