Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-3927

Problem with optional quantifiers and starting rule element annotation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0ruta
    • Fix Version/s: 2.2.1ruta
    • Component/s: Ruta
    • Labels:
      None

      Description

      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

      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
      

      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:

      anArt|At anAdj|Aj aNoun|No
      

      Thanks for looking into this.

        Attachments

          Activity

            People

            • Assignee:
              pkluegl Peter Klügl
              Reporter:
              prokopis Prokopis Prokopidis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: