You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jasper Huzen (JIRA)" <de...@uima.apache.org> on 2018/05/16 12:59:00 UTC

[jira] [Created] (UIMA-5777) Incorrect feature assignment on MARKTABLE because incorrect record can be used

Jasper Huzen created UIMA-5777:
----------------------------------

             Summary: Incorrect feature assignment on MARKTABLE because incorrect record can be used
                 Key: UIMA-5777
                 URL: https://issues.apache.org/jira/browse/UIMA-5777
             Project: UIMA
          Issue Type: Bug
          Components: Ruta
    Affects Versions: 2.6.1ruta
            Reporter: Jasper Huzen


Feature assignment with MARKTABLE can go wrong. 

Let assume that we have a CSV table with the following entries:
||Matching||ID||
|First Item|1|
|Second Item|2|
|SECOND ITEM|3|

and we use the MARKTABLE action so that we match on the first column and assign the second column to a feature of the annotaion.

If we do the match case sensitive and we use the following input as document: "SECOND ITEM" the annotation will get "2" as feature value.

The MARKTABLE action match correct on "SECOND ITEM". In the next step it tries to set the features. Therefore it call the getRowWhere method on the (csv) table to get the related row in the table.

The code in the getRowWhere method always compare the tableValue and lookup value lowercase and that will result in the record with "Second Item" in it. That's incorrect because we need the one with  "SECOND ITEM". 

I modified the code so that it first start with an exact match. If no matching item is found and we ignore case it will also do a case insensitive check.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)