[pt] Filter for rule - 2021-02-25

Hello @jaumeortola

Could you help me with the filter for this rule?:

	<!-- PROCURA PROVAR prova provará -->
    <rule id='TESE_PHD_PROCURAR_PROVAR_PROVARÁ' name="Tese Doutoramento: Evitar expressões do tipo 'procura provar'">
	<!--      Created by Marco A.G.Pinto, Portuguese rule 2021-02-12 + 2021-02-25 (1-JAN-2021+)      -->
<!--
A nossa tese procura provar a métrica. → A nossa tese provará a métrica.
Na nossa tese procuro provar a métrica. → Na nossa tese provarei a métrica.
Na nossa tese procuramos provar a métrica. → Na nossa tese provaremos a métrica.
-->
      <pattern>
		<and>
			<token regexp='yes' inflected="yes">procurar|buscar|pretender|tentar</token>
			<token postag='VMIP[13]S0|VMM02S0|VMIP1P0|VMIS1[SP]0' postag_regexp='yes'/>
		</and>
		<token postag='VMN0000' postag_regexp='no'/>
      </pattern>
	  <message>Se for uma tese de doutoramento utilize o estilo próprio de redação.</message>
	  <suggestion><match no='2' postag='VMN0000' postag_regexp="yes" postag_replace='VMI[FP][13]S0|VMIF1P0|VMIS1[SP]0'/></suggestion>
      <example correction="prova|provarei|provaremos|provará|provei|provo|provámo|provámos">(N)a nossa tese <marker>procura provar</marker> a métrica.</example>
	  <example>Na nossa tese provo que a métrica é eficaz.</example>
	  <example>Na nossa tese provarei que a métrica é eficaz.</example>
	  <example>Na nossa tese provaremos que a métrica é eficaz.</example>
    </rule>

I need to do something like in your suggestion weeks ago for another rule:

<rulegroup id='IR_VERBO-A_DE-SEGUIR-SEGUIDA-INFINITIVO' name="Ir_verbo + [a/de seguir/seguida] + Verbo_inf">
<!--      Created by Marco A.G.Pinto, Portuguese rule 2021-02-2 + 2021-02-03 + 2021-02-04 (1-JAN-2021+)      -->
<rule>
	<pattern>
		<marker>
			<and>
				<token inflected='yes'>ir</token>
				<token postag='V.[IS].*' postag_regexp='yes'/>
			</and>
			<token regexp='yes'>a|de|em</token>
			<token regexp='yes'>seguir|seguida</token>
			<token postag='VMN0000' postag_regexp='no'><exception>seguir</exception></token>
		</marker>
	</pattern>
  <filter class="org.languagetool.rules.pt.AdvancedSynthesizerFilter" args="lemmaFrom:4 lemmaSelect:V.N.* postagFrom:1 postagSelect:V.I.*"/>
	<message>Em certos contextos, esta perífrase pode ser simplificada.</message>
	<suggestion>{suggestion} \2 \3</suggestion>
	<example correction='Explico a seguir'><marker>Vou a seguir explicar</marker> o processo.</example>
	<example correction='Explicas a seguir'><marker>Vais a seguir explicar</marker> o processo.</example>
	<example correction='Explica a seguir'><marker>Vai a seguir explicar</marker> o processo.</example>
	<example correction='Explicamos a seguir'><marker>Vamos a seguir explicar</marker> o processo.</example>
	<example correction='Explicais a seguir'><marker>Ides a seguir explicar</marker> o processo.</example>
	<example correction='Explicam a seguir'><marker>Vão a seguir explicar</marker> o processo.</example>	
</rule>
  <rule>
    <pattern>
      <marker>
        <and>
          <token inflected='yes'>ir</token>
          <token postag='V.[IS].*' postag_regexp='yes'/>
        </and>
        <token postag='VMN0000' postag_regexp='no'><exception>seguir</exception></token>
      </marker>
      <token regexp='yes'>a|de|em</token>
      <token regexp='yes'>seguir|seguida</token>
    </pattern>
    <filter class="org.languagetool.rules.pt.AdvancedSynthesizerFilter" args="lemmaFrom:2 lemmaSelect:V.N.* postagFrom:1 postagSelect:V.I.*"/>
    <message>Em certos contextos, esta perífrase pode ser simplificada.</message>
    <suggestion>{suggestion}</suggestion>
    <example correction='Explico'><marker>Vou explicar</marker> a seguir o processo.</example>
    <example correction='Explicas'><marker>Vais explicar</marker> a seguir o processo.</example>
    <example correction='Explica'><marker>Vai explicar</marker> a seguir o processo.</example>
    <example correction='Explicamos'><marker>Vamos explicar</marker> a seguir o processo.</example>
    <example correction='Explicais'><marker>Ides explicar</marker> a seguir o processo.</example>
    <example correction='Explicam'><marker>Vão explicar</marker> a seguir o processo.</example>	
  </rule>
  <rule>
	<pattern>
		<token regexp='yes'>a|de|em</token>
		<token regexp='yes'>seguir|seguida</token>
		<marker>
			<and>
				<token inflected='yes'>ir</token>
				<token postag='V.[IS].*' postag_regexp='yes'/>
			</and>
			<token postag='VMN0000' postag_regexp='no'></token>
		</marker>
	</pattern>
  <filter class="org.languagetool.rules.pt.AdvancedSynthesizerFilter" args="lemmaFrom:4 lemmaSelect:V.N.* postagFrom:3 postagSelect:V.I.*"/>
	<message>Em certos contextos, esta perífrase pode ser simplificada.</message>
	<suggestion>{suggestion}</suggestion>
	<example correction='explico'>A seguir <marker>vou explicar</marker> o processo.</example>
	<example correction='explicas'>A seguir <marker>vais explicar</marker> o processo.</example>
	<example correction='explica'>A seguir <marker>vai explicar</marker> o processo.</example>
	<example correction='explicamos'>A seguir <marker>vamos explicar</marker> o processo.</example>
	<example correction='explicais'>A seguir <marker>ides explicar</marker> o processo.</example>
	<example correction='explicam'>A seguir <marker>vão explicar</marker> o processo.</example>	
  </rule>	  
  
</rulegroup>

Thanks!

EDIT: Sorry, I have just placed the more recent code at start.

Done here: [pt] improve rule TESE_PHD_PROCURAR_PROVAR_PROVARA · languagetool-org/languagetool@c2013dd · GitHub

A recently added feature of the AdvancedSynhesizerFilter has been used: creating a POS tag from two different tokens.

Thank you, @jaumeortola