uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Patry <alexandre.pa...@keatext.com>
Subject Re: Problem writing ruta extensions
Date Thu, 05 Dec 2013 15:44:08 GMT
On 2013-12-04 12:33, Sebastian wrote:
> Hi,
> I'm highly interested in ruta, and its potential applications in industrial
> applications. Right know I'm trying to create a simple toy condition
> extension that is simply a case insensitive INLIST condition. It is
> completely based on the InListCondition class, I also declared an
> implementation of the IRutaConditionExtension interface.
> With primitve types everything seems to work great, except when the
> condition is used with a variable :
> STRINGLIST MonthsList = {"january", ...};
> DECLARE Month;
> I get a class cast exception when the condition is being created, because
> MonthsList is a SimpleTypeExpression and I'm expecting a StringListExpression.
> Am I doing something wrong ? I suppose there is a way to resolve the
> variable to the actual list, but I missed it somehow.
It may not help you to get your toy extension working, but for small 
lists I like to use regular expressions where case insensitiveness is free:

W{REGEXP("(?i)january|february|march|...|december") -> MARK(Month)}



Alexandre Patry, Ph.D
Chercheur / Researcher

View raw message