Hi Marco,

If you want to take into account every possibility (only one comma present,
no comma at all) and always give the proper suggestion, you'll need to
write different rules.

One rule for: "é pois"

    <rule id="COMMA_3" name="Vírgula antes #3">
      <pattern>
       <marker>
            <token>é</token>
            <token>pois</token>
        </marker>
        <token><exception regexp="yes">[,;:–—\(]</exception></token>
      </pattern>
      <message>Usar vírgula: <suggestion>\1, \2,</suggestion></message>
      <example correction="é, pois,">Ela <marker>é pois</marker> do
Norte.</example>
    </rule>

One rule for: "é, pois"

    <rule id="COMMA_3" name="Vírgula antes #3">
      <pattern>
       <marker>
            <token>é</token>
            <token>,</token>
            <token>pois</token>
        </marker>
        <token><exception regexp="yes">[,;:–—\(]</exception></token>
      </pattern>
      <message>Usar vírgula: <suggestion>\1, \3,</suggestion></message>
      <example correction="é, pois,">Ela <marker>é, pois</marker> do
Norte.</example>
    </rule>

One rule for: "é pois,"

<rule id="COMMA_3" name="Vírgula antes #3">
      <pattern>
       <marker>
            <token>é</token>
            <token>pois</token>
        </marker>
        <token>,</token>
      </pattern>
      <message>Usar vírgula: <suggestion>\1, \2</suggestion></message>
      <example correction="é, pois">Ela <marker>é pois</marker>, do
Norte.</example>
    </rule>

Even using antipattern, I think you can not do it with only one rule.

Regards,
Jaume Ortolà


2016-06-13 12:29 GMT+02:00 Marco A.G.Pinto <marcoagpi...@mail.telepac.pt>:

> Hello!
>
> I have been trying to create the following rule, but it gives an error
> with "TESTRULES PT":
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *                            é                     [,;:–—\(]exception>
>             pois                          [,;:–—\(]exception>
>                 Usar vírgula: \1, \2,       Ela é pois do Norte.         *
>
>
> The idea is to suggest commas in:
> "É pois" -> "É, pois,"
>
> How do I do it?
>
> Thanks!
>
> Kind regards,
>         >Marco A.G.Pinto
>           -----------------------
>
> --
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Languagetool-devel mailing list
> Languagetool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to