Comments (2)
So part of this is a confusion of what the word_probability
is for and what it means. The word probability is the ratio of the word compared to the corpus. It allows for us to choose which of two words that are both possible answers should be selected. Generally you will never need to use that function unless you wanted to inspect a words value. You are likely getting 0.0 since those words are not in the result set. That could be a bug that should be resolved (likely throw an exception).
As for your other questions:
- Yes, selecting a distance of 1 would not solve that problem as diet is likely more common in the corpus.
- The text file can be of any form. It could be sentences, just words, anything. It just has to be a *.txt file; the one you listed would be perfect. I would recommend, if you are looking for very specific terms, to build your own spelling database: documentation on building a new dictionary
- I am not adding anything to have topic based dictionaries at the moment. Perhaps this could be its own issue that can be used for a place of discussion on the idea.
I hope this is helpful!
from pyspellchecker.
Thank you very much Barrust. I will take a look to how the programme works in deeper and the link to the documentation on building a new dictionary. Very interesting!
from pyspellchecker.
Related Issues (20)
- case_sensitive=True gives unexpected results HOT 6
- load_words is not prioritized HOT 1
- Common misspellings are not included HOT 2
- nan flagged as should not check HOT 1
- Look into a different data source to build dictionaries HOT 1
- When will v0.7.0 be released?
- PEP 517 and PEP 621 support HOT 1
- installing from source instructions outdated HOT 1
- Not Working in Python 3.11 HOT 1
- Missing countries in german language HOT 4
- Add py.typed
- PyPI entry points to wrong package HOT 1
- Incorrect word "thiss" in English dictionary HOT 3
- Incomplete words
- Error in load file function HOT 1
- Dozens of words are detected as wrong in German, though very common HOT 1
- Example of wrong spell-correction HOT 1
- Add Italian dictionary
- countries causing errors in 0.8.0 HOT 4
- Including common words in the "en.json.gz" resources HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyspellchecker.