Back to LanguageTool Homepage - Privacy - Imprint

[pt] Problem with rule

@jaumeortola

Hello!

TESTRULES PT gives an error with this rule I tried to create;

<rule id='SUBSTANTIVO_PLURAL_E_CHAVE' name="Substantivo-chave">
<!--      Created by Marco A.G.Pinto, Portuguese rule 2020-08-23      -->
  <pattern>
    <marker>
      <token postag='NC[CFM]P000' postag_regexp='yes'/>
      <token>chave</token>
    </marker>
  </pattern>
  <message>Utilize a forma composta.</message>
  <suggestion>/1-chave</suggestion>
  <example correction="conceitos-chave">Na nossa tese temos vários <marker>conceitos chave</marker>.</example>
</rule>

What is wrong with it?

Thanks!

@jaumeortola @tiff @dnaber

Any feedback on the rule above?

I believe that maybe the hyphen is seen as a wildcard, maybe I have to escape it, but I don’t know how to do it in a suggestion.

It seems a simple syntax error. Change: /1\1.

Ohhhh… it worked!

I was so stressed yesterday and in the day before that I didn’t notice the syntax error.

Thank you, Jaume.