-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically add character names to spellcheck dictionary #755
Comments
This is a very good Idea, my main Project where I use Manuskript, has 200+ Characters, still rising and a lot unusual Names in it. |
I would say don't just stop at characters, but anything that has an entry in the World references as well. |
I've started working on this: https://github.com/dmjohnsson23/manuskript It's an unfamiliar code base to me, so I'd love any feedback from team members. Not much done yet, but on the rare occasions when I have free time I'm working on it. |
The code for automatically adding character names is now working on my fork above. It currently doesn't take effect right away, you have to restart the application efore it picks up the changes. So, I've still got some bugs to iron out, but if anyone wants to try it out, go for it. I've only done character names, not world entries. I don't imagine world entries would be any harder, though that doesn't really appear like the way the word section was designed to be used. If you look at the example data, the world entries have plain English titles like "Culture", "Architecture", "Religion", and so forth; so I hesitate to add those. Any thoughts? |
@dmjohnsson23 It would be neat if you would open a pull request so this issue could be solved. I can probably look into it how to reload the dictionary without restarting the application if you need help. |
I hate to submit it unfinished. I will have some free time Saturday
morning, I'll try to work on it then, and I'll submit a pull request after
that.
…On Sun, Feb 21, 2021, 16:50 Tobias Frisch ***@***.***> wrote:
@dmjohnsson23 <https://github.com/dmjohnsson23> It would be neat if you
would open a pull request so this issue could be solved. I can probably
look into it how to reload the dictionary without restarting the
application if you need help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#755 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJXW3GI6WLWTGKBP7Z7QULTAGL6DANCNFSM4MLQ4W4Q>
.
|
I have created a work-in-progress pull request #839. The issue where the newly added names don't immediately take effect is still present. I think I now know why, but haven't come up with a good solution yet. I need to trigger the syntax highlighter used for spellchecking to rehighlight. Trouble is, getting a reference to that from the context where the name spellchecker is working seems like it might be a challenge without it making the code awkward and hacky. I will work on this some more next weekend hopefully. |
If you need more time to find a good solution for it, don't worry. Otherwise the code really is quite hacky at some points already. I currently hope that a switch from Qt to for example Gtk could help with restructuring the code. For example this would reduce the amount of GUI-generated python code in the repository. Also I think multiple core functions have to be rewritten from scratch to get rid of the current state of performance. For example the file access could be optimized in a way that you would only have to load the files you're editing. Currently we load all files of the project on statup and keep them in memory. ^^' |
A nice to have feature for this program would be to automatically add character names to the spellcheck dictionary. It's easy enough to do manually of course, but doing it automatically would be nice. It would also be better for instances where the user might change the spelling of a characters name, to have the old spelling removed from the dictionary and the new added.
It seems like this ought to be a fairly easy addition, and I'd be willing to make the change myself if someone more familiar with the project code would be willing to give me some information on how spellcheck works in Manuskript. I'm pretty handy with Python, though I mostly do web services and simple command-line scripts rather than user-facing GUI application like this. I looked over the code in the
spellcheck.py
module in the project, and it doesn't have a whole lot of documentation, and I'm not 100% sure what all the functions are for.The text was updated successfully, but these errors were encountered: