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

Fix Probability Distribution with Limited Character Set #30

Open
tallpauley opened this issue Jul 1, 2021 · 0 comments
Open

Fix Probability Distribution with Limited Character Set #30

tallpauley opened this issue Jul 1, 2021 · 0 comments

Comments

@tallpauley
Copy link
Owner

tallpauley commented Jul 1, 2021

If we have a tiny character set like hambugers and ask for words we get too many short words. This is because we've limited the word-wordcount pairs severely, and we're left with very high probability words like a and as, and very low probability words that have the required characters but will hardly show up:

wsv = wordsiv.WordSiv(limit_glyphs='hambugers')
wsv.words(lc=True, source='en_wordcount_web', num_words=10)
['guess', 'as', 'as', 'err', 'a', 'us', 'ease', 'message', 'as', 'mer']

We have the prob parameter (as seen below), but it would be ideal if we somehow can notice this happening and automagically pull from less frequently occurring words.

wsv.words(lc=True, source='en_wordcount_web', num_words=10, prob=False)
['resumes',
 'mrsa',
 'meager',
 'barber',
 'srgb',
 'basu',
 'sag',
 'hab',
 'aea',
 'ssh']
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

1 participant