W dniu 03.03.2016 o 19:06, Marco A.G.Pinto pisze: > Hello! > > The following Portuguese words require a comma before them: > 1) Eu gosto muito de chocolate, *mas *não posso comer para não engordar. > 2) Eu gosto muito de chocolate, *porém *não posso comer para não engordar. > 3) Eu gosto muito de chocolate, *contudo *não posso comer para não engordar. > 4) Eu gosto muito de chocolate, *no entanto* não posso comer para não > engordar. > 5) Eu gosto muito de chocolate, *entretanto *não posso comer para não > engordar. > 6) Eu gosto muito de chocolate, *todavia *não posso comer para não engordar. > > > Is there a simple way of adapting the rule Yakov helped me with the > other day?: > * <!-- OU SEJA ou seja, --> > <rule id="OU_SEJA" name="ou seja"> > <pattern> > <marker> > <token>ou</token> > <token>seja</token> > </marker> > <token negate="yes">,</token> > </pattern> > <message>Usar vírgula: <suggestion>\1 \2,</suggestion></message> > <example correction="ou seja,">Pensa primeiro, <marker>ou > seja</marker> escolhe acertadamente.</example> > </rule>* > > > PS-> Notice that in example 4) it is two words, not one.
Actually, I would write it in a slightly more general way. <token><exception regexp="yes">[,;:–—\(]</exception></token> <marker> <token>no</token> <token>entanto</token> </marker> Why? Just because one usually use an opening parenthesis, a colon etc. instead of a comma in some context. And exceptions have a slightly different logic than negation, which may become tricky in some situations with regular expressions (probably not here, though). Best, Marcin > > Thanks! > > Kind regards, > >Marco A.G.Pinto > ----------------------- > > -- > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > > > > _______________________________________________ > Languagetool-devel mailing list > Languagetool-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/languagetool-devel > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel