Back to LanguageTool Homepage - Privacy - Imprint

[pt] Problem creating rule "FAZER USO DE" - 2020-10-01

Hello to any developer,

I have been trying to create a rule that improves the grammar:

<!-- FAZER USO DE usar recorrer -->
<rulegroup id='FAZER_USO_DE-USAR-RECORRER' name="Fazer uso de > usar > recorrer">
<!--      Created by Marco A.G.Pinto, Portuguese rule - 2020-10-01 (2-JUL-2020+)     -->
	  <!-- DE -->
			<token inflected='yes'>fazer</token>
			<token regexp="no">uso</token>
			<token regexp="no">de</token>
		<message>Substitua por:</message>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>usar</match></suggestion>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>recorrer</match> a</suggestion>
		<example correction="usar|recorrer a">Vamos <marker>fazer uso de</marker> simuladores.</example>
	  <!-- DA -->
			<token inflected='yes'>fazer</token>
			<token regexp="no">uso</token>
			<token regexp="no">da</token>
		<message>Substitua por:</message>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>usar</match> a</suggestion>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>recorrer</match> à</suggestion>
		<example correction="usar a|recorrer à">Vamos <marker>fazer uso da</marker> tecnologia.</example>

	  <!-- DAS -->
			<token inflected='yes'>fazer</token>
			<token regexp="no">uso</token>
			<token regexp="no">das</token>
		<message>Substitua por:</message>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>usar</match> as</suggestion>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>recorrer</match> às</suggestion>
		<example correction="usar as|recorrer às">Vamos <marker>fazer uso das</marker> tecnologias.</example>

	  <!-- DO -->
			<token inflected='yes'>fazer</token>
			<token regexp="no">uso</token>
			<token regexp="no">do</token>
		<message>Substitua por:</message>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>usar</match> o</suggestion>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>recorrer</match> ao</suggestion>
		<example correction="usar o|recorrer ao">Vamos <marker>fazer uso do</marker> computador.</example>

	  <!-- DOS -->
			<token inflected='yes'>fazer</token>
			<token regexp="no">uso</token>
			<token regexp="no">dos</token>
		<message>Substitua por:</message>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>usar</match> os</suggestion>
		<suggestion><match no='1' postag='V.+' postag_regexp='yes'>recorrer</match> aos</suggestion>
		<example correction="usar os|recorrer aos">Vamos <marker>fazer uso dos</marker> computadores.</example>

So, I tested it with:

Vamos fazer uso de simuladores.
Vamos fazer uso da tecnologia.
Vamos fazer uso das tecnologias.
Vamos fazer uso do computador.
Vamos fazer uso dos computadores.
A Ana faz uso da tecnologia.

Well, I also tested with the Wikipedia tool and instead of suggesting “recorre à” it suggests “(recorrer) à” in several cases.

An example of this happening is in the sentence above:

A Ana faz uso da tecnologia.

It suggests:

usa a
uses a
(recorrer) à

I thought that some POS data might be missing in the verb “recorrer” but I added it and I still get the same results.

Can someone give me some tips on how to fix it?

It is a very good rule for Portuguese.


@jaumeortola @Ruud_Baars @Yakov

Can one of you give a tip regarding this rule?


Is the desired result recorre à?

This entries in added.txt don’t seem correct:

The conjugation of recorrer is incomplete in the dictionaries. The tags are apparently correct (recorre[recorrer/VMIP3S0,recorrer/VMM02S0]), but these tags don’t come from the dictionary, they come from the tagger, which analyzes with the prefix “re-” + the lemma “correr”.

Yes, the desired result is “A Ana RECORRE À tecnologia”

These are the differing forms (mostly missing forms) in “recorrer” taking as a model “correr”. Is it correct to add them to the dictionary?

— a/recorrer.txt
+++ b/correr.txt
@@ -1,3 +1,20 @@
+recorra recorrer VMM03S0
+recorra recorrer VMSP1S0
+recorra recorrer VMSP3S0
+recorrais recorrer VMM02P0
+recorrais recorrer VMSP2P0
+recorram recorrer VMM03P0
+recorram recorrer VMSP3P0
+recorramo recorrer VMM01P0
+recorramos recorrer VMM01P0
+recorramos recorrer VMSP1P0
+recorras recorrer VMM02S0
+recorras recorrer VMSP2S0
+recorre recorrer VMIP3S0
+recorre recorrer VMM02S0
+recorrei recorrer VMIP2P0
+recorrei recorrer VMM02P0
+recorreis recorrer VMIP2P0
recorrem recorrer VMIP3P0
recorremo recorrer VMIP1P0
recorremo recorrer VMIS1P0
@@ -5,6 +22,8 @@ recorremos recorrer VMIP1P0
recorremos recorrer VMIS1P0
recorrendo recorrer VMG0000
recorrer recorrer VMN0000
+recorrer recorrer VMN01S0
+recorrer recorrer VMN03S0
recorrer recorrer VMSF1S0
recorrer recorrer VMSF3S0
recorrera recorrer VMIM1S0
@@ -13,10 +32,8 @@ recorrera recorrer VMIM3S0
recorreram recorrer VMIM3P0
recorreram recorrer VMIS3P0
recorreras recorrer VMIM2S0
-recorrerde recorrer VMN02P0
recorrerdes recorrer VMN02P0
recorrerdes recorrer VMSF2P0
-recorrere recorrer VMN02S0
recorrerei recorrer VMIF1S0
recorrereis recorrer VMIF2P0
recorrerem recorrer VMN03P0
@@ -28,7 +45,6 @@ recorreria recorrer VMIC1S0
recorreria recorrer VMIC3S0
recorreriam recorrer VMIC3P0
recorrerias recorrer VMIC2S0
-recorrermo recorrer VMN01P0
recorrermos recorrer VMN01P0
recorrermos recorrer VMSF1P0
recorrerá recorrer VMIF3S0
@@ -44,9 +60,26 @@ recorresses recorrer VMSI2S0
recorreste recorrer VMIS2P0
recorreste recorrer VMIS2S0
recorrestes recorrer VMIS2P0
+recorreu recorrer VMIS3S0
+recorri recorrer VMIS1S0
+recorria recorrer VMII1S0
+recorria recorrer VMII2S0
+recorria recorrer VMII3S0
+recorriam recorrer VMII3P0
+recorrias recorrer VMII2S0
+recorrida recorrer VMP00SF
+recorridas recorrer VMP00PF
+recorrido recorrer VMP00SM
+recorridos recorrer VMP00PM
+recorro recorrer VMIP1S0
+recorrê recorrer VMX0000
recorrêramo recorrer VMIM1P0
recorrêramos recorrer VMIM1P0
recorrêrei recorrer VMIM2P0
recorrêreis recorrer VMIM2P0
recorrêsseis recorrer VMSI2P0
+recorríamo recorrer VMII1P0
+recorríamos recorrer VMII1P0
+recorríei recorrer VMII2P0
+recorríeis recorrer VMII2P0

yes, “recorrer” has the same morphologic data as “correr”.

I only added those two entries to added.txt because I took them from the verb “usar” hoping it would fix it, but I was wrong.

Where did you get all the POS data above from? :slight_smile:

From a dump of the tagger dictionary. I can send it to you by e-mail.

Adding recorre recorrer VMIP3S0 to added.txt the problem is fixed. But it would be better to add all the missing forms. Will you check and add these forms? Or do you want me to do it for you?

Is it hard for you to do it?

I know I am annoying, but this way we will make sure it will work 100% correct.

And tomorrow morning I could download the nightly with all the verb fixed and make some tests in this rule before committing it.

It is a good rule, for theses and such.

I have been creating rules that improve the grammar of theses since my cosupervisor said that my grammar is faulty in some parts.

In January, I will run LanguageTool in the whole thesis, after adding all the rules I can.

Added forms here:

What has to be done with these forms? They exist in “recorrer” but not in “correr”.

-recorrerde recorrer VMN02P0
-recorrere recorrer VMN02S0
-recorrermo recorrer VMN01P0

Thanks for the commit.

Maybe they are typos? I looked for the first one in Priberam, Infopédia and Wiktionary, and they don’t find any matches.