Back to LanguageTool Homepage - Privacy - Imprint

[pt] Issue with rule: confusion "e" and "é"

Hello @jaumeortola

I am trying to improve the rule I created yesterday of confusion between “e” and “é”.

I have made it a group rule, however this isn’t working for the sentence:

“A literatura do Esperanto é já imensa e com enorme rapidez cresce a cada dia e hora.”

<rule>
      <pattern>
	    <token negate_pos="yes" postag='V.+' postag_regexp='yes'/>
		<token min="1" max="3" postag='RG' postag_regexp='no'>
			<exception postag_regexp='yes' postag='NC.+|AQ0.+'/>
		</token>
		<marker>
			<token regexp='no'>e</token>
		</marker>
		<token postag='NC.S.+|AQ0.S.+' postag_regexp='yes'>
			<exception postag_regexp='yes' postag='V.+|PI.+|I|RG|SPS.+|RN|NP.'/>
		</token>
		<token negate_pos="yes" postag='SPS.+|CS|PP.+' postag_regexp='yes'/>
      </pattern>
      <message>Substitua por <suggestion>é</suggestion>.</message>
      <example correction="é">Isso nunca <marker>e</marker> possível.</example>
	 </rule>

I can’t find what is wrong.

Could you give a tip?

Thanks!

right now the rule is like this, but it still doesn’t work with the sentence above:

 <rule>
  <pattern>
    <token min="0" max="1"  negate_pos="yes" postag='V.+|SPS.+|NP.+' postag_regexp='yes'/>
	<token min="1" max="3" postag='RG' postag_regexp='no'>
		<exception postag_regexp='yes' postag='NC.+|AQ0.+'/>
	</token>
	<marker>
		<token regexp='no'>e</token>
	</marker>
	<token postag='NC.S.+|AQ0.S.+' postag_regexp='yes'>
		<exception postag_regexp='yes' postag='V.+|PI.+|I|RG|SPS.+|RN|NP.+'/>
	</token>
	<token negate_pos="yes" postag='SPS.+|CS|V.+|PD.+|PI.+|PP.+|I|RG' postag_regexp='yes'/>
  </pattern>
  <message>Substitua por <suggestion>é</suggestion>.</message>
  <example correction="é">Isso nunca <marker>e</marker> possível.</example>
  <example>A parede é branca por dentro e verde por fora.</example>	  
 </rule>