Back to LanguageTool Homepage - Privacy - Imprint

[pt] Problems creating rule - 2020-02-16

Hello!

I have been trying to create the following rule but when I run the stand-alone app, it throws all kind of errors.

<rule>
  <pattern>
      <token postag='CS' postag_regexp='no'>
	  <token postag='PD0MP000' postag_regexp='no'>
	  <marker>
		<token postag='VMIP3P0' postag_regexp='no'>
	  </marker>
  </pattern>
  <message>&MSG_ECV;</message>
    <suggestion><match no='1' include_skipped='all'/> <match no='2' include_skipped='all'/> <match no='3' include_skipped='all' postag='VMIP3P0' postag_replace='VMSP3P0' postag_regexp='no'/></suggestion>
  <example correction='representem'>Variamos os argumentos caso estes <marker>representam</marker> resultados fracos.</example>
  <example>Variamos os argumentos caso estes representem resultados fracos.</example>
</rule>

Can someone help?

Thanks!

@marco,

The pattern does not contain skip, but the suggestions contain include_skipped. Possibly this mismatch causes the errors. (I am guessing; I did not test.)

It still throws all kind of warnings.

<rule>
  <pattern>
      <token postag='CS' postag_regexp='no'>
	  <token postag='PD0MP000' postag_regexp='no'>
	  <marker>
		<token postag='VMIP3P0' postag_regexp='no'>
	  </marker>
  </pattern>
  <message>&MSG_ECV;</message>
    <suggestion><match no='3' postag='VMIP3P0' postag_replace='VMSP3P0' postag_regexp='no'/></suggestion>
  <example correction='representem'>Variamos os argumentos caso estes <marker>representam</marker> resultados fracos.</example>
  <example>Variamos os argumentos caso estes representem resultados fracos.</example>
</rule>

@Mike_Unwalla

Ahhhh…

It didn’t work because it had missing / in the lines.

Now it works.

Thanks!