I need to find the nearest word from a character and that word should startswith that character.
For example:
Sample Text:
What you need is What you get WYG.
From the sample text,I need to find the nearest word startswith W.
Something like:
# W{REGEXP("W.*")};
or more general
DECLARE SameChar, SomeType; CW{-> SomeType}; STRING firstChar; SomeType<-{SomeType{-> firstChar = substring(CW.ct,0,1)};} # W{REGEXP(firstChar+".*")-> SameChar};
DISCLAIMER: I am a developer of UIMA Ruta
Something like:
or more general
DISCLAIMER: I am a developer of UIMA Ruta