-
Notifications
You must be signed in to change notification settings - Fork 97
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
Ignore word function #53
Comments
Something like:
It's running but no test availlable (I don't know how to write it and no time actualy). If a developer more qualified than me can do the unit test and do a PR. Thank you. |
Yeah, the code looks legit, but I also don't have the time to do the test and all. Thanks for figuring this out. I'm leaving the issue open in case someone else has a similar use case. |
Ah I remembered there actually is a way to ignore words already (although a bit roundabout). The |
@filyp Yes indeed, but I find the way a little too boring because the goal and for only a few words. In addition, it modifies the base file, which is wrong when using autocorrect in several projects. |
I didn't mean modifying files but something like:
|
It's a possibility, the difference and that you have to subtract the ignored ones from the nlp array, longer processing time I think. (not tested) |
hi, can u please help me in adding some words ,as below words are not spell checked correctly,also i have tried add those updated words as per ur above code ,it is not working ,so can u add some words in your vocabulary .Or can u suggest some tested method to add these words. metaverse Thanks |
@charlietiwari In addition, kiyaverse metachamber metaroom are names specific to companies, so it seems to me that they will never be added to a dictionary. Metavarse when it will certainly soon be seen as it enters more and more into the common language of certain languages. Please create a new issue if the question does not match the current issue. |
@David-Baron ah, no, you don't subtract but rather add them to this nlp_data. This way, they are treated as real words and not corrected. Re performance, modifying a dictionary is pretty efficient - it has complexity O(n) where n is the number of new entries (here, words). And you just do it once, during initialization of Speller. In later usage, there should be no increase in processing time, because dictionary lookup time doesn't depend on the number of items in the dictionary. |
@filyp You are right, this works like a charm! |
Hello.
I can't find a function to ignore a word.
In some cases we need it.
An example in the English dictionary:
srai -> sry
but I have to ignore it.
The text was updated successfully, but these errors were encountered: