Back to LanguageTool Homepage - Privacy - Imprint

[pt] "Erro de crase" rule

Hello @tiff @Yakov

I have been trying to fix the rule by making changes in line 3862+:

  <pattern>
    <marker>
      <token inflected='yes' regexp='yes'>&requer_crase_verbos;
        <exception inflected='yes'>ser</exception></token>
      <token postag='R.' min='0' postag_regexp='yes'>
        <exception postag='C.+' postag_regexp='yes'/></token>
      <token regexp='yes'>as?</token>
    </marker>
      <token postag_regexp='yes' postag='N.F.+'>
        <exception postag='D..F.+|R.+' postag_regexp='yes'/></token>
  </pattern>

Look at the end:

    </marker>
      <token postag_regexp='yes' postag='N.F.+'>
        <exception postag='D..F.+|R.+' postag_regexp='yes'/></token>

for >a< I wanted it to become:

    </marker>
      <token postag_regexp='yes' postag='N.F.+'>
        <exception postag='D..F.+|R.+|N.FP.+' postag_regexp='yes'/></token>

and for >as< I wanted it to become:

    </marker>
      <token postag_regexp='yes' postag='N.F.+'>
        <exception postag='D..F.+|R.+|N.FS.+' postag_regexp='yes'/></token>

However, I have failed miserably to make it work and had to revert my changes.

Can someone help me with this code?

Thanks!