You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by "B. Li" <cs...@126.com> on 2019/07/26 09:54:05 UTC

how to match patterns back from the end of an input string

Hi All,


I would like to match patterns back from the end of an input string, which may not end at SENTENCEEND. I am wondering whether there are some special tokens like "^" and "$" in normal regular expression in RUTA.


Thanks in advance,


Baoli

Re: how to match patterns back from the end of an input string

Posted by "B. Li" <cs...@126.com>.
Thanks Peter.


That works for most cases, but, if we need to call sub-scripts recursively (using something like {->CALL(ASPECIALSCRIPT)}), it seems difficult to detect the ending of document in the script ASPECIALSCRIPT.


Kind regards,


Baoli
On 7/26/2019 18:27,Peter Klügl<pe...@averbis.com> wrote:
Hi,


there are no special language elements for this. Howver, there are many
other ways to do this (efficiently).

You could for example create an annotation on the last part of the
document with MARKLAST and then use that nnoation as a starting anchor
"@" in an additional rule.


Best,


Peter


Am 26.07.2019 um 11:54 schrieb B. Li:
Hi All,


I would like to match patterns back from the end of an input string, which may not end at SENTENCEEND. I am wondering whether there are some special tokens like "^" and "$" in normal regular expression in RUTA.


Thanks in advance,


Baoli

--
Dr. Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.kluegl@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó

Re: how to match patterns back from the end of an input string

Posted by Peter Klügl <pe...@averbis.com>.
Hi,


there are no special language elements for this. Howver, there are many
other ways to do this (efficiently).

You could for example create an annotation on the last part of the
document with MARKLAST and then use that nnoation as a starting anchor
"@" in an additional rule.


Best,


Peter


Am 26.07.2019 um 11:54 schrieb B. Li:
> Hi All,
>
>
> I would like to match patterns back from the end of an input string, which may not end at SENTENCEEND. I am wondering whether there are some special tokens like "^" and "$" in normal regular expression in RUTA.
>
>
> Thanks in advance,
>
>
> Baoli

-- 
Dr. Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.kluegl@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó