xixonenc
(xixonenc)
March 12, 2014, 9:52am
1
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!!!
dnaber
(Daniel Naber)
March 12, 2014, 11:07am
2
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?
xixonenc
(xixonenc)
March 12, 2014, 11:41am
3
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!!
dnaber
(Daniel Naber)
March 12, 2014, 12:03pm
4
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
xixonenc
(xixonenc)
March 12, 2014, 12:22pm
5
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!
xixonenc
(xixonenc)
March 12, 2014, 12:25pm
7
On two ways send me an error.
Thanks!
dnaber
(Daniel Naber)
March 12, 2014, 6:02pm
8
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>
xixonenc
(xixonenc)
March 12, 2014, 6:18pm
9
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.
dnaber
(Daniel Naber)
March 12, 2014, 6:28pm
10
Please add more correct and incorrect example sentences to the rule and post it again.
xixonenc
(xixonenc)
March 12, 2014, 6:59pm
11
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”