Re: Help improve rule pt_PT
I would try it like this: há segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos? atrás Com o verbo haver não é necessário usar "atrás". Há n segundos atrás. In other words, replace 'atrás' with an empty string. I am not sure if this leaves an undesired space character before the period, though. Also, IIRC rule ids should not contain accented characters. I couldn't test my version though, since I don't have Java installed on this office machine. Am 17.08.2016 um 14:05 schrieb Marco A.G.Pinto: > Thanks, Jan, I use "1" and "3" but TESTRULES PT gives an error in: > Com o verbo haver não é necessário usar "atrás": \1 > \2 \3. > > Can you help? > > Thanks! > > On 17/08/2016 12:36, Jan Schreiber wrote: >> Marco, >> >> I think you could replace >> >> from your original version with the following: >> >> (Replace 0 with 1 if necessary.) >> >> Best, >> Jan >> >> Am 17.08.2016 um 13:25 schrieb Marco A.G.Pinto: >>> 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á** >>> **** >>> **>> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >>> **atrás** >>> ** ** >>> ** Com o verbo haver não é necessário usar "atrás": >>> \1 \2 \3.** >>> ** Há n segundos >>> atrás.** >>> **** >>> ** >>> ** >>> **** >>> **** >>> **** >>> ** ** >>> **** >>> **à** >>> **** >>> **quase** >>> **** >>> **>> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >>> ** ** >>> ** Substituir «à» por há.** >>> ** Conheço a Ana à quase >>> 30 anos.** >>> ** * >>> >>> >>> 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á >>> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos? atrás Com o verbo haver não é necessário usar "atrás": \1 \2 \3. Há n segundos atrás. Среда, 17 августа 2016, 10:59 +03:00 от "Marco A.G.Pinto" <>: Hello! I want to improve the following rule: *** **** ** ** **há** **** **>>> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** **atrás** ** ** ** Com o verbo haver não é necessário usar "atrás": \1 \2 \3.** ** Há n segundos atrás.** *** 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 > -- ___ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel
Re: Help improve rule pt_PT
Thanks, Jan, I use "1" and "3" but TESTRULES PT gives an error in: Com o verbo haver não é necessário usar "atrás": \1 \2 \3. Can you help? Thanks! On 17/08/2016 12:36, Jan Schreiber wrote: > Marco, > > I think you could replace > > from your original version with the following: > > (Replace 0 with 1 if necessary.) > > Best, > Jan > > Am 17.08.2016 um 13:25 schrieb Marco A.G.Pinto: >> 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á** >> **** >> **> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >> **atrás** >> ** ** >> ** Com o verbo haver não é necessário usar "atrás": >> \1 \2 \3.** >> ** Há n segundos >> atrás.** >> **** >> ** >> ** >> **** >> **** >> **** >> ** ** >> **** >> **à** >> **** >> **quase** >> **** >> **> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >> ** ** >> ** Substituir «à» por há.** >> ** Conheço a Ana à quase >> 30 anos.** >> ** * >> >> >> 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á >>> >>> >> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos? >>> atrás >>> >>> Com o verbo haver não é necessário usar "atrás": >>> \1 \2 \3. >>> Há n segundos >>> atrás. >>> >>> >>> Среда, 17 августа 2016, 10:59 +03:00 от "Marco A.G.Pinto" <>: >>> >>> Hello! >>> >>> I want to improve the following rule: >>> >>> *** >>> **** >>> ** ** >>> **há** >>> **** >>> **>> >>> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >>> **atrás** >>> ** ** >>> ** Com o verbo haver não é necessário usar "atrás": >>> \1 \2 \3.** >>> ** Há n segundos >>> atrás.** >>> *** >>> >>> >>> 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
Re: Help improve rule pt_PT
Marco, I think you could replace from your original version with the following: (Replace 0 with 1 if necessary.) Best, Jan Am 17.08.2016 um 13:25 schrieb Marco A.G.Pinto: > 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á** > **** > ** regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** > **atrás** > ** ** > ** Com o verbo haver não é necessário usar "atrás": > \1 \2 \3.** > ** Há n segundos > atrás.** > **** > ** > ** > **** > **** > **** > ** ** > **** > **à** > **** > **quase** > **** > ** regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** > ** ** > ** Substituir «à» por há.** > ** Conheço a Ana à quase > 30 anos.** > ** * > > > 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á >> >> > regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos? >> atrás >> >> Com o verbo haver não é necessário usar "atrás": >> \1 \2 \3. >> Há n segundos >> atrás. >> >> >> Среда, 17 августа 2016, 10:59 +03:00 от "Marco A.G.Pinto" <>: >> >> Hello! >> >> I want to improve the following rule: >> >> *** >> **** >> ** ** >> **há** >> **** >> **> >> regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** >> **atrás** >> ** ** >> ** Com o verbo haver não é necessário usar "atrás": >> \1 \2 \3.** >> ** Há n segundos >> atrás.** >> *** >> >> >> 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 > -- ___ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel
Re: Help improve rule pt_PT
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á** **** **segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** **atrás** ** ** ** Com o verbo haver não é necessário usar "atrás": \1 \2 \3.** ** Há n segundos atrás.** **** ** ** **** **** **** ** ** **** **à** **** **quase** **** **segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** ** ** ** Substituir «à» por há.** ** Conheço a Ana à quase 30 anos.** ** * 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á > > regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos? > atrás > > Com o verbo haver não é necessário usar "atrás": > \1 \2 \3. > Há n segundos > atrás. > > > Среда, 17 августа 2016, 10:59 +03:00 от "Marco A.G.Pinto" <>: > > Hello! > > I want to improve the following rule: > > *** > **** > ** ** > **há** > **** > ** > regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?** > **atrás** > ** ** > ** Com o verbo haver não é necessário usar "atrás": > \1 \2 \3.** > ** Há n segundos > atrás.** > *** > > > 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