Sugunalakshmi Pagemajik
Sugunalakshmi Pagemajik

Reputation: 1054

Partial Text match - Uima Ruta

Whether a partial text match is possible in Ruta (WORDTABLE)?

Sample Input: yearbook book databook worship friendship yearbook

Sample CSV: book;b. ship;sh.

I have a sample CSV file and a sample input where I need to match a word which ends with "book" and "ship".Needs to assign feature value from column 2.

Upvotes: 1

Views: 74

Answers (1)

Viorel Morari
Viorel Morari

Reputation: 547

Yes, you could make use of regular expressions:

DECLARE MyWord(String ending);
W{REGEXP(".*book\b") -> CREATE(MyWord, "ending"="b");

Or you could use string functions:

w:W{endsWith(w.ct, "book") -> CREATE(MyWord, "ending"="b")};

Upvotes: 0

Related Questions