uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prokopis Prokopidis (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-3927) Problem with optional quantifiers and starting rule element annotation
Date Wed, 02 Jul 2014 10:45:25 GMT

    [ https://issues.apache.org/jira/browse/UIMA-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049814#comment-14049814

Prokopis Prokopidis commented on UIMA-3927:

No, there is not a specific reason for using the reluctant version. Your suggestion on using
the greedy version worked. Thanks!

> Problem with optional quantifiers and starting rule element annotation
> ----------------------------------------------------------------------
>                 Key: UIMA-3927
>                 URL: https://issues.apache.org/jira/browse/UIMA-3927
>             Project: UIMA
>          Issue Type: Bug
>          Components: ruta
>    Affects Versions: 2.2.0ruta
>            Reporter: Prokopis Prokopidis
>            Assignee: Peter Klügl
> Hi,
> As the Ruta documentation mentions, "writing rules that contain a first rule element
with an optional quantifier is discouraged and will result in ignoring the optional attribute
of the quantifier." A solution for overcoming this is to declare a rule element as a starting
rule element by adding “@” directly in front of it. Thus, I am using ruta rules like
> {code}
> Token??{REGEXP(Token.posTag.value, "At")} // Article
> Token??{REGEXP(Token.posTag.value, "Aj")} // Adjective
> @Token{REGEXP(Token.posTag.value, "No")->MARK(Chunk, 1,3)}; // Noun
> {code}
> to mark nouns and optional pre-modifiers before them as chunks
> However, the rule seems to match only Adj Noun sequences and not to match input like:
> {code}
> anArt|At anAdj|Aj aNoun|No
> {code}
> Thanks for looking into this.

This message was sent by Atlassian JIRA

View raw message