Rule help!

Hi Forum!
Sorry for my english because is not my native language.
In this rule there is something wrong malfunctioning.

<rule id="16.10" name="Confusió o error en escriure es enlloc de és">    
        	<pattern>
                <token>es</token>
                <token postag_regexp="yes" negate_pos="yes" postag="V.*"><exception postag_regexp="yes" negate_pos="yes" postag="V.*"/><exception regexp="yes">majúscules|minúscules</exception></token>
        	</pattern>
        	<message full-explanation-url="http://cml.uoc.edu/avicat/16_10.html">Cal escriure <suggestion>és <match no="2"/></suggestion></message>
        	<short>Hi sobra un accent.</short>
        	<example type="incorrect"><marker>El cotxe verd es campió mundial.</marker></example>
        	<example type="correct"><marker>El cotxe verd és campió mundial.</marker></example>
        </rule>

This rule does not make the mistake when I write “es” instead of “és”

Help!!!

What are you trying to achieve: Do you want to match “es” followed only by verbs? Or only by anything that’s not a verb?

Hi!
Thanks for your quickly response.

“és” followed for only by anything that’s not a verb

The other rules for the “es” followed only by verbs are working properly.
Thanks!!

In that case, you don’t need such a complicated exception. Please try this:

<rule id="MY_ID" name="Confusió o error en escriure es enlloc de és">    
        <pattern>
            <token>es</token>
            <token postag_regexp="yes" negate_pos="yes" postag="V.*">
                <exception regexp="yes">majúscules|minúscules</exception>
            </token>
        </pattern>
        <message>Cal escriure <suggestion>és <match no="2"/></suggestion></message>
        <short>Hi sobra un accent.</short>
        <example type="incorrect">El cotxe verd <marker>es campió</marker> mundial.</example>
        <example type="correct">El cotxe verd <marker>és campió</marker> mundial.</example>
    </rule>

You might also want to test your rule in our online editor at Check a LanguageTool XML rule

Hi!
This rule that you send me does not work properly
When I write “Joan es pentina” suggests “Joan és pentina” when the correct is the first. “pentina” is a conjugated verb.
Thanks!



On two ways send me an error.
Thanks!

Indeed - as “pentina” has another reading other than verb, the negation logic won’t work. So an exception is indeed needed:

<rule id="MY_ID" name="Confusió o error en escriure es enlloc de és">    
        <pattern>
            <token>es</token>
            <token>
              <exception postag_regexp="yes" postag="V.*"></exception>
              <exception regexp="yes">majúscules|minúscules</exception>
            </token>
        </pattern>
        <message>Cal escriure <suggestion>és <match no="2"/></suggestion></message>
        <short>Hi sobra un accent.</short>
        <example type="incorrect">El cotxe verd <marker>es campió</marker> mundial.</example>
        <example type="correct">El cotxe verd <marker>és campió</marker> mundial.</example>
        <example type="correct">Joan es pentina.</example>
    </rule>

Hi!
A lot of thanks for your responses but I think that you don’t understand me.
The rule has to detect all “és” of verb “ser” but not “es” of pronom. This “és” always is followed for any particles except verbs.

In this rules, that you help me, are not working properly. The last rule detect whether it’s okay or not.
Kind Regards.

Please add more correct and incorrect example sentences to the rule and post it again.

Correct:
“Joan és alt”
Joan és gran"
Joan és un campió.
El cotxe verd és el campió del món.

Incorrect:
Joan és pentina
Joan és cagà
The same that are correct but without accent on “es”