I am trying to make a rule to detect a pattern saying of . where x is a word annotated under "Service" annotation(i already enterd its list in gazeetter) and y can be any token and i want my rule to return the value of y.
I successfully made the rule for y(where token length=1). Now i want to extend it for y whose length>1.
This runs fine:
rule: of
(
{Service}
{Token.string=="of"}
({Token}):tok
):ser
-->
tok.Of={queryparam=:tok.Token@string}
and i use this queryparam using this jape in my java programme.
But now i want is to return multiple tokens after of and use it in my java program. I tried using various patterns but they are not working. I tried using inputAS and outputAS on rhs but having hard time to run it successfully. Appreciable if any1 can help me.