Hi all

I was writing a rule were I had to catch a phrase with last word being
noun, but only if that noun is not part of adverb chunk (with another
word following). The best way to do that seems to use adverb chunk in
exception but looks like this is not supported. So after multiple
experiments and reading our wiki pages I wrote a rule like this and it
works but it does generate a warning:

Running pattern rule tests for Ukrainian... The Ukrainian rule:
PASSIVE_PREDICATE:1 (exception in token [4]), token [4], contains
"тією мірою" that contains token separators, so can't possibly be
matched.

Current solution looks ugly and although it works I'd like to make it
right. So the question is is there a reason why chunks are not
supported in exceptions? And if there's a reason we should not support
chunks in exceptions what's the best way to write a rule below
(without splitting it to two or complicating it even more)?

Thanks
Andriy

               <pattern>
                    <token postag_regexp="yes" postag="(noun|pron).*v_zna.*"/>
                    <marker>
                    <token postag="impers"/>
                    <token postag_regexp="yes" postag="adj:.*v_oru.*"
min="0" max="1"/>
                    <token postag_regexp="yes"
postag="noun.*v_oru.*:ist.*|pron.*v_oru.*">
                      <exception postag_regexp="yes" postag="noun.*v_oru$"/>
                      <exception inflected="yes">тією мірою</exception>
                    </token>
                    </marker>
                </pattern>

------------------------------------------------------------------------------
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to