Page 1 of 2
plugin Spell Checker
Posted: 19.09.2022 16:23
by A:C
Hello and thank you for the Spell Checker so far.
I had a problem with a large dictionary (about 4MB).
If I double click on one of some larger words it won't be selected anymore. It seems this behavior comes from enchant because it takes too long time to compute word fail or pass.
Therefore I changed the single click to double click for later right click spelling suggestions.
Further I disabled suggestions if you use the 'remove all marks' command because it still wasn't responding nice.
I put my version of the init and install files here as attachment. You may have a look at them and feel free to use it.
It seems that json include was not used, so I removed it also.
Best regards
Andreas
Posted: 29.09.2022 15:46
by main Alexey
Ok, I am applying the patch but without change of on_click->on_click_dbl, because its visible regression in functions. user needs the context menu update after usual click.
Posted: 29.09.2022 16:33
by main Alexey
I see regression is spell check in big files.
file 2Mb:
https://www.learningcontainer.com/downl ... text-file/
dict: EN_US.
old plugin: full check was about 14 sec here.
new plugin: full check - 18 sec.
another moment: if I cancel (Esc key) checking of the file, and run full check again, new code works MUCH SLOWER, ie it needs 30-40 sec to check the file now. seems you needs to clear old markers from previous check.
pls help.
git:
https://github.com/CudaText-addons/cuda_spell_checker
Posted: 30.09.2022 22:00
by A:C
Hi Alexey,
THX for review.
You are right. Inserting markers is very slow.
(Inserting: I mean delete some markers in between and add again if still markers afterwards exists)
Appending markers is still fast.
So I adapted back to delete all markers first and write new marker in a bunch.
My intention was to leave all not changed markers as they are. Especially if you only use a selection. But if speed is important we have to do it this way.
Also corrected a bug: Percents were displayed wrong if a selection was used.
Posted: 01.10.2022 09:17
by main Alexey
this time I don't find mistakes. thanks for your work. publishing this.
Posted: 01.10.2022 09:49
by main Alexey
issue with new code.
EDIT-- it is old issue, so don't worry.
- take 2 Mb file (lorem ipsum) linked above by me
- select 2nd sentence from the 2nd paragraph. (paragraphs are EOL+EOL separated).
- call 'Check text' - plugin underlines the entire paragraph no.2, but it must check only 2nd sentence.
Posted: 01.10.2022 10:32
by A:C
In the 'original' source the spell check minimum is to check one line.
The 2 MB file paragraphs are realized by long lines. If you switch off word-warp you will see that the check includes only one line.
I think I can change this behavior to only check real selected area if you want. This may help if you use 'check with suggestions'. Otherwise the whole 'paragraph' is processed. May not be what users want.
Posted: 01.10.2022 10:49
by main Alexey
I just added this checking, was not hard.
Posted: 24.11.2022 12:07
by king.midas
Hello!
Questions:
- Is there a setting to turn off all processing on a mouse click so that there is no delay from it? In the RMB menu, there is still no "add to dictionary" item, which is often necessary
- There is a problem (checked on an "empty" distribution), only the first word is added to the dictionary by the "Add" button, nothing happens after that, the dictionary will have only one word (if you delete it, you can add a new "one word" again) - Is this a bug or should I look for the reasons in the computer?
- For a portable installation, is it possible to store the "enchant" folder with custom dictionaries somewhere in the CudaText folder?
versions:
CudaText 1.177.1.0, win64-x86_64-win32, fpc 3.2.3
cuda_spell_checker 2022.09.29
Posted: 25.11.2022 08:32
by king.midas
Also, even if you call the `Remove marks` command, it is impossible to select a word that was misspelled by double-clicking