Daniel Naber <daniel.na...@languagetool.org> wrote:
On 2014-07-17 10:52, Dominique Pellé wrote:
>
> > I glanced at the Polish grammar.xml, but I could not find such rules.
>
> Sorry, I guess my grep command was wrong and I actually found <match>
> outside the exception element.
>
> > cvc-complex-type.2.4.d: Invalid content was found starting with
> > element 'match'. No child element is expected at this point.
>
> I think this answers the original question: it's not supposed to work.
> You might try to patch it anyway of course, if it doesn't add a lot of
> complexity.
>
Hi Daniel
I'm not sure how to fix it without spending time studying
the code. But I found a workaround anyway by replacing...
<token regexp="yes">vue?s?<exception>\2</exception></token>
... with...
<and>
<token regexp="yes">vue?s?</token>
<token negate="yes"><match no="1"/></token>
</and>
I just committed in git (French rule VU_DE_MES_YEUX_VU).
By the way, I also had to use <match no="1"/>
instead of <match no="2"/>. This is confusing
to me. It seems that <match no="..."/> counts tokens
sometimes from 0 (in fact I can see some <match no="0"/>
in some rules) and sometimes from 1!? Is this explained
anywhere?
Regards
Dominique
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel