[pt] Compound words with numbers

Hello @jaumeortola

There seems to be an issue with words with hyphens and numbers.

For example, I have both in added.txt and spelling.txt:
COVID-19
Covid-19

and it still appears as a typo in LibreOffice.

Is there something that can be done to fix it?

Thanks!

Which version? Nightly version? LanguageTool for LibreOffice is updated every three months.

On the other hand, spell checking in LibreOffice is usually done by Hunspell, not by LanguageTool.

I am using the nightly.

The words in spelling.txt are added to the personal dictionary in LibreOffice, but it seems it didn’t work with these words I mentioned above.

The reason is that LibreOffice is using a different tokenization. It probably tokenizes COVID-19 in more than one token.
To fix the problem, you need to add “covid” as a single word in spelling.txt. And then you can suggest COVID > COVID-19 with a rule.

It is depending on the options in the .aff of the hunspell files. If - is added as a word char, covid-19 will be considered one word. But it might also affect other words.

ohhhh :frowning:

There are a lotvof options in the aff file, stuff smarter (I have to admit) than LT speller. But it is slower maling suggestions.
Nuspell is a recent redo of hunspell which is compatible and should be faster.

The words “COVID-19” and “Covid-19” were manually added by me to added.txt and spelling.txt.

They don’t come with the Portuguese speller.

I understood that.