Return-Path: Delivered-To: apmail-uima-user-archive@www.apache.org Received: (qmail 25562 invoked from network); 21 Feb 2011 12:24:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Feb 2011 12:24:29 -0000 Received: (qmail 27962 invoked by uid 500); 21 Feb 2011 12:24:29 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 27659 invoked by uid 500); 21 Feb 2011 12:24:25 -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 27645 invoked by uid 99); 21 Feb 2011 12:24:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 12:24:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anujsays@gmail.com designates 209.85.212.50 as permitted sender) Received: from [209.85.212.50] (HELO mail-vw0-f50.google.com) (209.85.212.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Feb 2011 12:24:17 +0000 Received: by vws11 with SMTP id 11so916528vws.23 for ; Mon, 21 Feb 2011 04:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=4YcRPqqhZAokxwpJfXDnnKujvKVwlVg8kFSMAVwS0MY=; b=lDmuHFy57+HsZeXZ7mYf9DmiH65ijOfpCIoKe/DodTxOnak9POd6qHV/Il4ihgGRh7 OlWJqdYhR2J3G2bIrKteEmuqHq5+DDyGJse5UqS+ByhF5PmVYZ+9ahmxzDajcAPkfmPp TlYcRxWZuRMt/NfuBQK7NcAQnt5iKQZ3cbRLE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=NA6XClKCsRKhMywP5Xksr3nuXnoRUe5viyYu8jo0mlqp7clSBF+f6Cfs5HzQnUtS3W /ZQjqylMod52Bl6pyEJPSU/nK1f65He3g13W7iMvyQLnRdpC/eBgMay5LVtXesuwCdKI B3J5DRJwPhahd9l6R6q125fkxt2cgcAjaOxNI= MIME-Version: 1.0 Received: by 10.52.167.99 with SMTP id zn3mr1698569vdb.130.1298291036600; Mon, 21 Feb 2011 04:23:56 -0800 (PST) Received: by 10.220.163.204 with HTTP; Mon, 21 Feb 2011 04:23:56 -0800 (PST) In-Reply-To: <4D5EB772.5090709@schor.com> References: <4D5EB772.5090709@schor.com> Date: Mon, 21 Feb 2011 17:53:56 +0530 Message-ID: Subject: Re: Using configuration parameter within regex validator From: Anuj Kumar To: user@uima.apache.org Content-Type: multipart/alternative; boundary=bcaec53f92770d3e0b049cc9f03c --bcaec53f92770d3e0b049cc9f03c Content-Type: text/plain; charset=ISO-8859-1 Thanks Marshall. Later, I wanted to generate the regex dynamically as well, so as of now I have written my own annotator for those cases. Regards, Anuj On Fri, Feb 18, 2011 at 11:46 PM, Marshall Schor wrote: > > > On 2/16/2011 9:34 AM, Anuj Kumar wrote: > > Hi, > > > > I am trying to use the Validation for the Regex annotator. For validation > I > > need to use a threshold value and I want it to be configurable. I can > > declare that as a configuration parameter, but is there a way to access > that > > configuration parameter within the regex validator? > > > > If not then I think the only solution is to write my own Annotator and > then > > use the initialize method to access the configuration from the UIMA > context. > > What would you suggest? > > This seems like a good approach - you could subclass the > RegularExpressionAnnotator, and add the bits you need. > > -Marshall > > Regards, > > Anuj > > > --bcaec53f92770d3e0b049cc9f03c--