K. K.
K. K.

Reputation: 136

How to correctly use the LAST Condition to MARK the last word of the document

I'm trying to mark the last word in the document as a Annotation to be used by other rules.

This is what I've tried so far:

DocumentAnnotation{LAST(W) -> MARK(Unit2)};
Document{LAST(W) -> MARK(Unit2)};

Neither of these rules seem to work. Is it even possible to mark the last word of the document by these means?

The Problem is that we try to find the last word/period of the Document so that a previously marked Annotation can be shifted to the last word.

Any help would be greatly appreciated.

Upvotes: 1

Views: 50

Answers (2)

Sugunalakshmi Pagemajik
Sugunalakshmi Pagemajik

Reputation: 1054

You cant use LAST Condition for this scenario. Rather you can use MARKLAST action.

DECLARE LastWord;
Document{->MARKLAST(LastWord)};

Upvotes: 3

K. K.
K. K.

Reputation: 136

Nevermind, I'm an oaf,

it's done with

Document{->MARKLAST(Unit2)}

Upvotes: 1

Related Questions