Back to LanguageTool Homepage - Privacy - Imprint

[pt] Improve rule: CHAMAR_DENOMINAR_DE — 2022-07-09

@rjlima

Hello Ricardo,

I was revising my thesis and found out that some more possibilities are missing, such as:

“O conceito designado de blah blah”

“designar” is not being recognised.

I guess we could need some more verbs.

I want to rewrite the complete rule tonight, do you have an idea for a better rule ID, rule name and suggestion message?

Thanks!

This is the current rule:

	<!-- CHAMAR/DENOMINAR DE chamar/denominar -->
    <rulegroup id='CHAMAR_DENOMINAR_DE' name="Chamar/Denominar de → Chamar/Denominar" type="style">
    <!--      Created by Marco A.G.Pinto, Portuguese rule 2021-07-07 + 2021-07-08 + 2021-08-20 + 2021-08-21 (25-JUN-2021+)      -->
	<!--
Temos uma teoria denominada de matemática. → Temos uma teoria denominada matemática.
A teoria, denominaram-lha de matemática. → A teoria, denominaram-lha matemática.
Ele foi chamado de volta, em meio à sua viagem.
Chamaram-no de volta, em meio à sua viagem.
	-->
	<url>https://ciberduvidas.iscte-iul.pt/consultorio/perguntas/a-regencia-dos-verbos-chamar-e-denominar-ii/34550</url>
	  <rule>
<!-- MARCOAGPINTO 2021-08-22 (25-JUN-2021+) *START* -->
<!--
Queremos os chamares de Marco.
-->
      <antipattern>
		<token postag='DA0MP0|PD0MP000|PP3MPA00' postag_regexp='yes'/>
		<token>chamares</token>
		<token>de</token>
		<token min="0" max="1" regexp='yes'>["'’“«]</token>
		<token postag='NP.+|AQ0.+|NC.+|UNKNOWN' postag_regexp='yes'/>
      </antipattern>
<!-- MARCOAGPINTO 2021-08-22 (25-JUN-2021+) *END* -->		  
      <pattern>
		<marker>
			<token regexp='yes' inflected='yes'>chamar|denominar</token>
			<token>de</token>
		</marker>
		<token min="0" max="1" regexp='yes'>["'’“«]</token>
		<token postag='NP.+|AQ0.+|NC.+|UNKNOWN' postag_regexp='yes'>
			<exception regexp='yes'>regresso|volta</exception>
		</token>
      </pattern>
      <message>Os verbos 'chamar' e 'denominar' são pronominais, a redação correta é sem preposição.</message>
	  <suggestion>\1</suggestion>
      <example correction="denominada">Temos uma teoria <marker>denominada de</marker> matemática.</example>
	  <example>Ele foi chamado de volta, em meio à sua viagem.</example>
	  </rule>
	  
	  <rule>  
      <pattern>
		<marker>
			<token regexp='yes' inflected='yes'>chamar|denominar</token>
			<token regexp='yes' spacebefore='no'>&hifen;</token>
			<token regexp='yes' spacebefore='no'>as?|os?|las?|los?|lhas?|lhes?|nos?|me|se|te|vos</token>
			<token>de</token>
		</marker>
		<token min="0" max="1" regexp='yes'>["'’“«]</token>
		<token postag='NP.+|AQ0.+|NC.+|UNKNOWN' postag_regexp='yes'>
			<exception regexp='yes'>regresso|volta</exception>
		</token>
      </pattern>
      <message>Os verbos 'chamar' e 'denominar' são pronominais, a redação correta é sem preposição.</message>
	  <suggestion>\1\2\3</suggestion>
      <example correction="denominaram-lha">A teoria, <marker>denominaram-lha de</marker> matemática.</example>
	  <example>Chamaram-no de volta, em meio à sua viagem.</example>
	  </rule>	  	  
    </rulegroup>

@rjlima

Or can I try to generalise it to all pronominal verbs?

I am not sure about the results.

@rjlima

It won’t work for “designar” if we generalised it because it is not a pronominal verb:

I guess we will need a list of all possible verbs, there shouldn’t be that many.

Also, is “designação” valid to remove the “de”?:
“O curso tem a designação de blah blah”

Thanks!

EDIT:

See the examples there, “designar” will accept “de”, so I am going to try pronominal verbs.

Como usar o verbo

designar

nomear, indicar

Como sua única herdeira, o tio designou a irmã.

designar de/para/por

nomear, indicar

Ela designou-o de chefe espiritual do grupo.

Fui designada para dirigir a banda.

Prefiro que designes o candidato pelo nome.

EDIT2:

apelidou. chamou. denominou. designou. comeu.

All have the same POS, so I can’t rely on POS for selecting the verbs, I will need a list.

Hi @marcoagpinto I understand what you are trying to do, but as with other cases that I have commented, replacements of one word by another may be complicated. Designar, nomear and denominar are all related but they also have their specific meanings. I can say “Ele nomeou os gatos da casa” which simply is to give a name and neither designar nor denominar fit as a replacement.

Hello Ricardo!

Yes, I will create exceptions for special cases, the big problem is when in 600 000 sentences they aren’t in the database, so I can’t spot them.

There are rules to which there are only a few hits, and it is not possible to predict the exceptions.

I have been since 5am fixing a GENDER antipattern which will fix tons of false positives.

I guess only at night I will touch the other rules.

And at 5am I want to move to the next antipattern that creates false positives in the GENDER.

:heart: :heart: :heart: :heart: :heart:

Thanks for the feedback!

@rjlima

I am a fool!

I forgot to post here the link of the rule I created:

Basically the pronominal verbs are placed in an entity (variable) and it is checked if they have a preposition “de” after them.

I added some antipatterns to fix false positives.

The output .txt is in the commit.

There shouldn’t be any false positives, I hope.

If you find any, I will fix them.

“designar” uses “de” according to the Infopédia dictionary (and it is not pronomial), so I didn’t include it in the rule:

Thank you and sorry for the confusion.