Hello @tiff @udomai @jaumeortola
The following sentence triggers an error:
É só telefonemas e e-mails de clientes a reclamar.
Since it is a Java rule and I don’t know Java, could one of you code an antipattern for it?
e
space
e > space_next="no"
- space next="no"
Thanks!
udomai
(Udo Mai)
2
Hi!
This is REDUNDANT_CONJUNCTIONS
, first subrule. It’s in the grammar.xml. Could you add the AP for
<token>e</token>
<token>e</token>
<token spacebefore="no"/>
?
marcoagpinto
(Marco A.G.Pinto)
3
Let me try.
First I will run a check on Tatoeba + Wikipedia 600 000 sentences to see the before and the after.
marcoagpinto
(Marco A.G.Pinto)
4
It didn’t work:
<!-- MARCOAGPINTO 2021-09-22 (25-JUN-2021+) *START* -->
<!--
É só telefonemas e e-mails de clientes a reclamar.
-->
<antipattern>
<token>e</token>
<token>e</token>
<token spacebefore="no"/>
</antipattern>
<!-- MARCOAGPINTO 2021-09-22 (25-JUN-2021+) *END* -->
I tried to search for the words of the suggestion, and they aren’t found in the grammar.xml, so it must be in Java.
udomai
(Udo Mai)
5
What message do you see? I see “Possível fragmento. Utilize apenas uma conjunção deste tipo.”
It is in the grammar.xml. The antipattern works. See this commit.
marcoagpinto
(Marco A.G.Pinto)
6
"Possível erro de digitação. Repetiu uma palavra.
Examples:
Este é é apenas uma frase de exemplo. x
Este é apenas uma frase de exemplo. ✓"
udomai
(Udo Mai)
7
I can’t reproduce this. The sentence you gave above only triggers the XML rule:
É só telefonemas e e-mails de clientes a reclamar.
The second example you gave is a true positive (since there is a space behind the second word).
I was using the Stand-alone tool to get the examples.
that is how I find the rules.
jaumeortola
(jaumeortola)
10
The best solution is to add “e-mail” and “e-mails” as tagged words. This way they will be tokenized as one token. Done here: [pt] e-mail (added.txt) · languagetool-org/languagetool@b829941 · GitHub