Hello,

I am facing some issues with Ruta's MARFAST, and started to digg into the
JUnit tests in order to make sure I understood it right. Below is some
documentation I came up with. I will commit it, but for now I don't quite
understand the second result (T2). Could anyone explain in details what is
going on, Thanks.

-- Renaud


// MARKFAST(T1,...) ignores WS in resources (MarkFastTestList.txt) so

// they 'collapse' to 100 and 200;

// spaces are not retained in Ruta script, so all 3 numerical inputs in

// MarkFastText.txt also collapse to 100, 100, 200 and thus match.

RutaTestUtils.assertAnnotationsEquals(cas, 1, 3, "1 0 0", "100",

"2 0 0");


// MARKFAST(T2,...) does NOT ignore WS in resources, so no resource

// matched (since SPACE are not retained, resources collapse to 100 and

// 200, while input is 1 0 0 and 2 0 0). WHY?!?!?!

RutaTestUtils.assertAnnotationsEquals(cas, 2, 0);


// from now on, SPACE are retained


// MARKFAST(T3,...) space retained in input, but we ignore WS in resources

// Thus 1 0 0 and 100 are identical and get matched 1 time;

// The resource 2 0 0 gets collapsed to 200 and does not match

// the inputs ('1 0 0' or '2 0 0').

RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "100");


// T4 space retained in input and WS "retained" in resources,

// so 2 'exact' matches (not 100 match)

RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "1 0 0", "2 0 0");

Reply via email to