Search code examples
uimaruta

WORDTABLE not working properly


I have a code like:

WORDTABLE presidentsOfUSA = 'presidentsOfUSA.csv';
DECLARE Annotation PresidentOfUSA(STRING party, INT yearOfInauguration);
Document{->MARKTABLE(PresidentOfUSA, 1, presidentsOfUSA, "party" = 2,
    "yearOfInauguration" = 3)};

CSV like:
Bill Clinton;democrats;1993
Bills Clinton;republicans;2001

Data like: Bill Clinton is president. Bills Clinton is president.

Observation: When i execute code it triggers on only "Bill Clinton" and not "Bills Clinton" even when word "Bills Clinton" is present in data.

It works fine if i keep only one entry in csv 1st/2nd.

Thanks in Advance!


Solution

  • This is caused by the lookup algorithm in Ruta. You either need to remove the whitespaces in the csv file, or let them be removed by ruta by setting the parameter dictRemoveWS to true.