languagetool-org / languagetool-for-libreoffice

add-on for LibreOffice/OpenOffice (used to be part of repo "languagetool")
GNU Lesser General Public License v2.1
0 stars 1 forks source link

Global spelling doesn't work 100% in LibreOffice? — 2024-04-03 #6

Open marcoagpinto opened 2 months ago

marcoagpinto commented 2 months ago

Heya, @jaumeortola

Screenshot 2024-04-03 083102

Thanks!

marcoagpinto commented 2 months ago

@FredKruse

Fred, maybe it is an issue with the Extension?

Thanks!

jaumeortola commented 2 months ago

In LibreOffice, the spelling is usually the LibreOffice spelling, not the LanguageTool spelling, right? @FredKruse

We would need to disable the de LibreOffice speller and use the LT spellers. The obstacle to doing that is that the dictionaries files are too large. But I think at some point there was a discussion about this, and it seemed acceptable to add the spelling dictionaries to do the LibreOffice/LanguageTool package.

FredKruse commented 2 months ago

Before LT 6.3, the LT additional LT dictionaries were added as 'private' dictionaries. This led to serious problems in some languages due to its enormous size. Since LT 6.3 the situation is different. LT is used as a second spell checker. However, only individual words are checked (no strings with spaces). This works perfectly in German (words that LT recognizes as correct are not marked). If there are mechanisms in other languages that recognize a combination of words as correct, we should make it a project for LT 6.5. I would then need help with examples (ODT files) and if possible a little tutoring on the technique in which LT does the spell check.

marcoagpinto commented 2 months ago

@FredKruse

Here is an example document in Portuguese.

multiwords_marcoagpinto_pt_20240404.odt

marcoagpinto commented 2 months ago

@FredKruse

It works partially, see the video:

https://github.com/languagetool-org/languagetool/assets/5192600/78e5ebea-18f5-4ed8-9f54-42fd5c92a0fe

FredKruse commented 2 months ago

Is it correct that the words are only recognized as correct by LT in combination of all three words (i.e. "World Trade" is incorrect? "World Trade Center" is correct). The problem is that LO spell checkers check a maximum of two words. I can't change that even if I install an LT spell checker. I can do try to have LT check the combination of two words (doesn't work in 6.4 so far). Would that help?

marcoagpinto commented 2 months ago

@FredKruse

Even with two words, they appear as typos.

See the attachment:

multiwords_marcoagpinto_pt_20240405.odt

FredKruse commented 2 months ago

As I wrote before. I've implemented a spell checker in the extension, that uses the internal LT spell checking. But it works only for single words until now. LO supports the checking of two word pairs. This is the maximum I could implement. This I will do for 6.5 in the next days.

FredKruse commented 2 months ago

The check of two words is added to the Lt spell checker of the extension. More words are not supported by LO. Please test it with tomorrow's snapshot.

marcoagpinto commented 2 months ago

Thank you, @FredKruse

I will test it tomorrow.

marcoagpinto commented 2 months ago

@FredKruse

I can confirm that it is working.

Thanks!

@mikekaganski Would it be possible to open a ticket in LibreOffice Bugzilla for custom support of the number of words used in spelling or increase it to three (a ton of multiwords for pt-PT use three words)?

Also, Mike, make it possible to change words to italic (for example, foreign words) from the LT Extension?

Thanks!