Skip to content
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

append words to default wordlist #16

Open
sbakhit opened this issue Nov 27, 2020 · 4 comments
Open

append words to default wordlist #16

sbakhit opened this issue Nov 27, 2020 · 4 comments

Comments

@sbakhit
Copy link

sbakhit commented Nov 27, 2020

I understand you can have your own custom wordlist and even make it default. it would be great if one can also append to the current default. The default one works great for me except for a few words that are not there.

@shullaw
Copy link

shullaw commented Nov 27, 2020

wordninja.DEFAULT_LANGUAGE_MODEL = wordninja.LanguageModel('my_lang.txt.gz')

I think you can just go find this file, and add to it. The only thing you'd have to figure out is what is the probability of the word you are adding? I believe the words are in a list, line by line, of descending probability.

@sbakhit
Copy link
Author

sbakhit commented Nov 27, 2020

I added this PR to make it easier to achieve this. feel free to discard it you don't agree.

@keredson
Copy link
Owner

keredson commented Dec 2, 2020

they are in descending probability. i didn't add this as a feature because i didn't have any good ideas as to how to express that probability when adding. but likely adding it to the end of the files is a good default strategy. (better than nothing certainly!)

@kapilmeena
Copy link

@keredson "I have some names which i want to change dynamically .." I think this is the use case where we need to add words in starting of file so they can have highest priority then english launguage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants