barrust / pyspellchecker

Pure Python Spell Checking http://pyspellchecker.readthedocs.io/en/latest/
MIT License
710 stars 164 forks source link

Add Custom Word Freq Dict Sample To Docs #59

Closed ede0m closed 4 years ago

ede0m commented 4 years ago

It is probably obvious to most, but would you be able to add the samples from your tests to the documents for how custom word freq dicts and lists should be constructed?

https://github.com/barrust/pyspellchecker/blob/master/tests/resources/small_dictionary.json

barrust commented 4 years ago

I am happy to help where I can. Is this what you are looking for? How to Build a New Dictionary

There are several ways to build a new dictionary using the code provided. In essence, you want to build a Counter object of words. Or, you can use the Word Frequency object to hopefully make it easier.

ede0m commented 4 years ago

Thanks for the response. I was more talking about explicitly showing the format of the word freq dict. I assumed the key,value pairs were the word,count but was just suggesting adding that small_dictionary.json sample to the docs in that section you linked to make it clear what it should look like.

barrust commented 4 years ago

That sounds good to me! Being the author of the project you don't see the limiting docs. If you would like to add a PR, I am happy to put in some more info into the docs!