You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Anuj Kumar <an...@gmail.com> on 2011/02/16 15:34:19 UTC

Using configuration parameter within regex validator

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?

Regards,
Anuj

Re: Using configuration parameter within regex validator

Posted by Anuj Kumar <an...@gmail.com>.
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 <ms...@schor.com> 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
> >
>

Re: Using configuration parameter within regex validator

Posted by Marshall Schor <ms...@schor.com>.

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
>