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
plugin Spell Checker
plugin Spell Checker
- Attachments
-
- __init__.py
- (15.77 KiB) Downloaded 164 times
-
- install.inf
- (1.32 KiB) Downloaded 206 times
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
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
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
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.
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.
- Attachments
-
- __init__.7z
- Version 2
- (4.86 KiB) Downloaded 170 times
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
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.
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.
-
- Posts: 40
- Joined: 26.02.2019 13:47
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
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
-
- Posts: 40
- Joined: 26.02.2019 13:47