uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kl├╝gl <peter.klu...@averbis.com>
Subject Re: UIMA Ruta use of features in a block statement
Date Tue, 30 May 2017 13:55:41 GMT

yes, this should throw an error when the script is parsed. I have to
take closer look, could be that the feature is interpreted as literal
string matching condition because of a string expression representing
the feature.

What is the range of the feature wordLemma? Support in ruta for
StringArray and StringList is still not really given.

If you want to iterate, you need to iterate over annotations currently.
The rules also operate always on types or annotations, something that is
a reference to some text position. However, this should not be a problem
as you can simply use the existing Lemma annotation.

You could try something like:

FOREACH(lemma) Lemma{}{
    lemma{REGEXP(lemma.wordLemma, ".*vergess.*") -> Value2};

or even

l:Lemma{REGEXP(l.wordLemma, ".*vergess.*") -> Value2};

with the boolean string function, it could work like this:

l:Lemma{contains(l.wordLemma, "vergess") -> Value2};

(I did not test the rules and I was assuming several things like feature



Am 30.05.2017 um 15:35 schrieb Lisa Langnickel:
> Hi, 
> I would like to use a BLOCK statement to iterate over the values of a feature.
> In more detail, I applied a lemmatizer before and would like to work on the "lemmas"
> I tried something like this (where Lemma.wordLemma describes the feature of Lemma):
> BLOCK(forEACH) Lemma.wordLemma{}{
>     Document{-> MATCHEDTEXT(s), ASSIGN(a,contains(s,"vergess"))};
>     Document{a -> Value2};
> }
> There is no error message, but nothing happens. Instead, when only working on the type
"Lemma", it works. 
> Is there any possibility to work on the feature within the block statement? 
> Thanks in advance, 
> Lisa 

View raw message