From user-return-6900-apmail-uima-user-archive=uima.apache.org@uima.apache.org Thu Jan 7 21:25:21 2016 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 6370118A4D for ; Thu, 7 Jan 2016 21:25:21 +0000 (UTC) Received: (qmail 1469 invoked by uid 500); 7 Jan 2016 21:25:16 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 1421 invoked by uid 500); 7 Jan 2016 21:25:16 -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 1410 invoked by uid 99); 7 Jan 2016 21:25:16 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 21:25:16 +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 9CE54C0D15 for ; Thu, 7 Jan 2016 21:25:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.646 X-Spam-Level: X-Spam-Status: No, score=0.646 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.554, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ldI88EyrqTvk for ; Thu, 7 Jan 2016 21:25:15 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id B576C20270 for ; Thu, 7 Jan 2016 21:25:13 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aHI3L-0006D6-9X for user@uima.apache.org; Thu, 07 Jan 2016 22:25:03 +0100 Received: from rrcs-67-78-118-146.sw.biz.rr.com ([67.78.118.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jan 2016 22:25:03 +0100 Received: from chinthana.wimalasuriya by rrcs-67-78-118-146.sw.biz.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jan 2016 22:25:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: user@uima.apache.org From: Daya Chinthana Wimalasuriya Subject: Problem with optional rule elements Date: Thu, 7 Jan 2016 21:21:01 +0000 (UTC) Lines: 32 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 67.78.118.146 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36) This looks like a bug to me. I can get the optional rule elements to work when followed by COMMA, as follows. DECLARE Feedback; (W{REGEXP("change|modify|alter")} W? W? W? COMMA) {-> MARK(Feedback)}; This would match the following. change the current rubric, change the rubric, change rubric, But if I have a W or a W with REGEXP as the element following the optional elements, it doesn't work. DECLARE Feedback; (W{REGEXP("change|modify|alter")} W? W? W? W{REGEXP("rubric")}) {-> MARK(Feedback)}; Doesn't match the following. (it should) change the current rubric change the rubric But it would match "change the the the rubric" (when words occur for optional elements) I've seen that there has been a similar issue sometime back: https://issues.apache.org/jira/browse/UIMA-3338 Not sure whether this issue related to that bug. I'm using UIMA RUTA workbench 2.3.1 on Eclipse Luna (4.4.2)