Yakov, It didn't work.
I tried it in the stand-alone tool after using *TESTRULES PT*, with the sentences: *Isso aconteceu à quase 20 anos!** **Isso aconteceu à quase vinte e três anos!** **Há 10 anos atrás** **Há quarenta e dois anos atrás* Rules I changed: * <!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/SEMANAS/MESES/ANOS ATRÁS (remove "ATRÁS") -->** ** <rule id="HÁ-ATRÁS" name="há n tempo atrás">** ** <pattern>** ** <token skip="1">há</token>** ** <token skip="1"></token>** ** <token regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?</token>** ** <token>atrás</token>** ** </pattern>** ** <message>Com o verbo haver não é necessário usar "atrás": <suggestion>\1 \2 \3</suggestion>.</message>** ** <example correction="Há n segundos"><marker>Há n segundos atrás</marker>.</example>** ** </rule>** ** ** ** ** ** <!-- À QUASE há quase -->** ** <rule id="À_QUASE" name="há quase">** ** <pattern>** ** <marker>** ** <token>à</token> ** ** </marker> ** ** <token skip="1">quase</token> ** ** <token skip="1"></token>** ** <token regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?</token>** ** </pattern>** ** <message>Substituir «à» por <suggestion>há</suggestion>.</message>** ** <example correction="há">Conheço a Ana <marker>à</marker> quase 30 anos.</example>** ** </rule> * Thanks! Kind regards, >Marco A.G.Pinto ----------------------- On 17/08/2016 11:35, Yakov Reztsov wrote: > Hello! > One of the options is add *skip="1":* > > <!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/SEMANAS/MESES/ANOS ATRÁS (remove > "ATRÁS") --> > <rule id="HÁ-ATRÁS" name="há n tempo atrás"> > <pattern> > <token skip="1">há</token> > <token skip="1" ></token> > <token > regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?</token> > <token>atrás</token> > </pattern> > <message>Com o verbo haver não é necessário usar "atrás": > <suggestion>\1 \2 \3</suggestion>.</message> > <example correction="Há n segundos"><marker>Há n segundos > atrás</marker>.</example> > </rule> > > Среда, 17 августа 2016, 10:59 +03:00 от "Marco A.G.Pinto" <>: > > Hello! > > I want to improve the following rule: > > * <!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/SEMANAS/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?|semanas?|mês|meses|anos?</token>** > ** <token>atrás</token>** > ** </pattern>** > ** <message>Com o verbo haver não é necessário usar "atrás": > <suggestion>\1 \2 \3</suggestion>.</message>** > ** <example correction="Há n segundos"><marker>Há n segundos > atrás</marker>.</example>** > ** </rule>* > > > I want the token after "há" to accept up to three words. > > For example: > "há *vinte e três* dias atrás" > > What changes shall I make? > > Thanks! > > Kind regards, > >Marco A.G.Pinto > ----------------------- > > -- > > > -- > > Yakov Reztsov --
------------------------------------------------------------------------------
_______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel