Hi Andriy,

As a beginner in LanguageTool I know almost nothing about this, but I do
have a few decades of experience in regular expressions, and the .* looks
strange to me in a replacement expression:

postag_replace="$1lname$2.*"

Are you sure it shouldn't simply be

postag_replace="$1lname$2"

?

Best,
Jesper



2016-09-13 22:27 GMT+02:00 Andriy Rysin <ary...@gmail.com>:

> Sorry if this is already written somewhere - I looked at wiki pages but
> could not find anything relevant.
>
> I have two tokens (first name and last name) and in the suggestion I want
> to inflect second token the same as the first. I tried to do this:
>
> <suggestion><match no="1" postag_regexp="yes"
> postag="(noun.*:m.*:)fname(.*)" postag_replace="$1lname$2.*">\
> 2</match></suggestion>
>
> but it sends the tests into 100% CPU loop and I don't have access to my
> Eclipse to try to debug this.
>
> Is there a right way to do this? If not does it make sense to look why we
> deadloop with logic above and try to fix it?
>
> Thanks
> Andriy
>
> P.S. I have similar logic for token inflection agreement in Java rules but
> it's pretty heavy and this was a simple case I thought I could do in xml
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Languagetool-devel mailing list
> Languagetool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to