I have just created a rule to correct the misuse between subject and object pronouns in Portuguese. Example:
Eu quero comprar ele. (I want to buy he). — That’s how it is in Portuguese.
Eu quero comprá-lo. — That’s the correct version would be.
For you to understand the changes, these are them for “Comprar ele” (which has a mistake):
“Ele” cannot be used in that situation because it is a subject pronoun. In this case, the object pronoun is " O". Because the verb is ended in R, the verb loses it and receives an accent (comprá). Then “O” receives L in front of it (LO). The expression becomes COMPRÁ-LO. as you can see, both words become linked by a hyfen.
This is the rule I have created:
<rule id="PRONOME_OBLIQUIO" name="Pronome obliquio"> <pattern> <marker> <token postag='VMN.*' postag_regexp='yes'></token> <token postag='PP3.*' postag_regexp='yes'></token> </marker> </pattern> <message>Uso inadequado do pronome. '<match no="1" regexp_match="VMN.*" regexp_replace=""/>-<match no="2"/></message> <example correction=''><marker>comprar ele</marker>.</example> <example>comprá-lo.</example> </rule>
The problem I have is that I am not being able to make a suggestion. Can anybody help me out, please?