Back to LanguageTool Homepage - Privacy - Imprint

[pt] "topos de gama" vs "topo de gama"

(Marco A.G.Pinto) #1


Tiago, I would like to ask your opinion about the subject.

“Telemóveis topo de gama” or “telemóveis topos de gama”?

I want to create this rule.

I am almost sure that the correct way is “topo” e não “topos”.

I searched on Google and the vast majority is “topo”.


(Marco A.G.Pinto) #2

yes, today is work day, but I have been up since 6-7am to work on my projects.

(Marco A.G.Pinto) #3

If you think it is “topo” then please add this rule:

    <!-- TOPOS DE GAMA topo de gama -->
    <rule id="TOPOS_DE_GAMA" name="topo de gama">
     <message>Substituir «topos de gama» por <suggestion>topo de gama</suggestion>.</message>
     <suggestion>topo de gama</suggestion>
     <example correction="topo de gama">Quero telemóveis <marker>topos de gama</marker>.</example>

I sent an e-mail to Yakov the other day and he told me that before submitting new rules to grammar.xml, one should use “SVN Checkout…” to have the most recent file.

I believe that clicking on the grammar.xml and select “SVN update” should have the same effect.

Anyway, I will do an “SVN update” tomorrow and I hope to have some new rules to add.


Kind regards,

(Tiago F. Santos) #4

Great you came back.

My informed guess is that ‘Topo’ (Top) is qualifying ‘gama’ (range) so I believe that the number concordance is made between ‘topo’ e ‘gama’.

I do not know SVN, but you should follow Yakov advice. He seams very knowledgeable.
As a cautionary tale, yesterday, though no harm was done, I have submitted a messy update due to the lack of a single ‘-r’ in ‘git pull -r’ on my local files update.

I have been optimizing existing rules but I have not pushed your other rule yet. Do not forget to include it in your next update, as well as other similar optimization to other rules. I am also pushing today the general gender concordance rules, so today regression tests will be verbose.

(Marco A.G.Pinto) #5

What other rule? :slight_smile:

The à-há?

What is the code I should use? I got confused in the other post regarding it.

Anyway, I have been thinking about one more rule to add.

After you give me green light (commit your rules), I will do a SVN UPDATE, then add two new rules and commit grammar.xml.

One of these days I will try to use the tool that tests the rules on the Wikipedia articles, but only for pt_PT, but Daniel said it takes hours to do the testing :frowning:

(Tiago F. Santos) #6

A few more optimization. Tested on testrules so you can push this:

<!-- HÁ n SEGUNDOS/MINUTOS/HORAS/DIAS/SEMANAS/MESES/ANOS ATRÁS (remove "ATRÁS") --> <rule id="HÁ-ATRÁS" name="há n tempo atrás"> <pattern> <token skip="-1">há <exception scope="next" postag='VM[CIS][CFIMPS][0123][SP]0' postag_regexp='yes'></exception></token> <token regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?</token> <token>atrás</token> </pattern> <message>Com o verbo haver não é necessário usar "atrás": <suggestion><match no="1" include_skipped="all"/> <match no="2"/></suggestion>.</message> <example correction="Há n segundos"><marker>Há n segundos atrás</marker>.</example> </rule>
<!-- À n SEGUNDOS/MINUTOS/HORAS/DIAS/SEMANAS/MESES/ANOS há n tempo--> <rule id="À-HÁ_N_TEMPO" name="há n tempo"> <pattern> <marker> <token>à</token> </marker> <token min="0" regexp="yes">quase|poucos?|alguns</token> <token skip="4"><exception scope="next" postag='VM[CIS][CFIMPS][0123][SP]0' postag_regexp='yes'></exception></token> <token regexp="yes">segundos?|minutos?|horas?|dias?|semanas?|mês|meses|anos?</token> </pattern> <message>Substituir «à» por <suggestion>há</suggestion>.</message> <example correction="há">Conheço a Ana <marker>à</marker> quase 30 anos.</example> </rule>

(Marco A.G.Pinto) #7


I have pushed both and also added two new rules:

  1. topos de gama > topo de gama
  2. premio > prémio

The second one works like this:
and it suggests to replace “premio” with “prémio”.

However, “premio” is not in the Minho University speller, so I added it to the spelling.txt but it will only work in the stand-alone tool and in the browser add-on since I believe that LanguageTool can’t overcome the real speller in LibreOffice/OpenOffice.

I checked for “premio” in Priberam and MS Office 2016 and it is a valid word, the verb “premiar” (on Priberam site (FLIP on-line) you can select the conjugate option and write there “premiar” and it will appear in the list).

To be even more sure, I right-clicked on MS Office 2016 and saw it has several synonyms.

(Tiago F. Santos) #8

You may want to rephrase that because it really sounds like advertisement.

(Marco A.G.Pinto) #9

“If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle.”

― Sun Tzu, The Art of War


EDIT: The Art of War is one of the most important and sold management books today