[pt] Help create rule "a cada NOUN1 NOUN2"

Hello!

Imagine this:
“de dois em dois minutos faço isto.”
(“from two in two minutes” → “every two minutes”)

1=de
2=DOIS
3=em
4=DOIS
5=minutos

I want to check if 2 == 4 and create a rule:
“a cada /2 /5”

How can I compare if 2 matches 4?

This is also good for an English rule.

Thanks!

See:

<rule>
    <pattern>
        <token>de</token>
        <token></token>
        <token>em</token>
        <token><match no="1"/></token>
    </pattern>
    <message>Did you mean <suggestion>a cada \2</suggestion>?</message>
    <example correction="a cada dois"><marker>de dois em dois</marker>.</example>
</rule>

The match numbers inside <pattern> are 0,1,2… Inside <suggestion> they are 1,2,3…

1 Like

@jaumeortola

Thank you very much!

@jaumeortola

Done!

Thanks!