Thanks, Yakov!
It worked like a charm!
Not even commercial software have this rule! :-P
Kind regards from your friend,
>Marco A.G.Pinto
-----------------------
On 30/04/2015 21:03, Yakov Reztsov wrote:
Hello!
You rule is like this:
<!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/MESES/ANOS ATRÁS (remove
"ATRÁS") -->
<rule id="HÁ-ATRÁS" name="há n tempo atrás">
<pattern>
<token>há</token>
<token></token>
<token
regexp="yes">segundos?|minutos?|horas?|dias?|mês|meses|anos?</token>
<token>atrás</token>
</pattern>
<message>O verbo haver remove a necessidade de usar "atrás":
<suggestion>\1 \2 \3</suggestion></message>
<example correction="HÁ n SEGUNDOS"><marker>HÁ n SEGUNDOS
ATRÁS</marker></example>
</rule>
I tested this rule on community.languagetool.org, and I got 21 matches.
--
Yakov Reztsov
Четверг, 30 апреля 2015, 18:55 +01:00 от "Marco A.G.Pinto"
<marcoagpi...@mail.telepac.pt>:
Hello!
How do I create a rule that asks to remove the word "atrás" when
"há" is used since it is redundant?
The rule in English for example would be:
"10 days ago" -> "há 10 dias atrás"
The verb "há" in Portuguese removes the need to use "atrás".
I triggered here the plural and singular forms of time.
I just need to know how to make the rule suggest the removal of
"atrás".
<!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/MESES/ANOS ATRÁS (remove
"ATRÁS") -->
<rule id="HÁ-ATRÁS" name="há n tempo atrás">
<pattern>
<token>há</token>
<token></token> ; HOW TO MAKE IT ACCEPT ANY WORD HERE?
<token
regexp="yes">segundos?|minutos?|horas?|dias?|mês|meses|anos?</token>
<token>atrás</token>
</pattern>
<message>O verbo haver remove a necessidade de usar
"atrás".</message>
<example correction="???????????">?????????????</example>
</rule>
Thanks!
Kind regards,
>Marco A.G.Pinto
----------------------
--
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel