Name | spell4checker JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-04-17 08:29:20 |
maintainer | None |
docs_url | None |
author | TAWSIF AHMED |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
### Spell-Checker: Wrote studying LeetCode 75 Problems
#### Introduction
Writing Spell-checker is a challenge due to the complicated nature of searching and matching correct matches of user written words. Thus, providing correct spellings.
[StackOverflow](https://stackoverflow.com/questions/2294915/what-algorithm-gives-suggestions-in-a-spell-checker) and [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance) offer in-depth knowledge in writing a spell-checker but are quite limited and outdated. It’s quite difficult to reverse engineer the spell checker ones present in Windows 11 by default. Including spell-checker has fundamental rules and later others tweak them to make it faster and add more features.
Establishing no prior rules how it should work, and present Neural Spell Checkers being prominent in Grammarly and Google Docs, I went on quest to write a spell checker from scratch using my understanding of Algorithms specifically LeetCode problems I solved in the past couple of weeks and reading through Articles.
#### Structure of SpellChecker
A unique and similar structure of past and present spell checkers were derived while designing this Algorithm. Starting
1. A Prefix Tree search Algorithm to load every word from the dictionary into its respective nodes
2. Iterating over the words and using Longest Common Sequence (LCS) to find most likely match for the input word
3. Edit Distance (Levenshtein Distance) to determine the perfect match and returning result.
Word with highest LCS and lowest Edit distance is determined as a perfect match.
#### Learning outcomes
Practising LeetCode concepts in a real world project is valuable. Including better understanding how different Algorithms come into play and work to solve a critical problem in a unified manner. And showcasing problem solving and creativity traits.
##### LeetCode Problems (used)
1. Edit Distance
2. Longest Common Sequence
3. Implement a Trie
These were part of LeetCode 75 Problems. https://leetcode.com/studyplan/leetcode-75/
##### Critical Pointers
1. I don’t provide UI and interface to interact with the algorithm. A terminal interface needs to be utilised.
2. A Public dictionary dataset was used.
3. The clearest explanation of Spell Checker Algorithm and Code on the Internet.
4. Time Complexity O(n * m * (m + m))
**Consider star the repository if it helps you!**
Raw data
{
"_id": null,
"home_page": null,
"name": "spell4checker",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "TAWSIF AHMED",
"author_email": "sleeping4cat@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/d1/0b/d8f9bfd261a8689292b1f86a7c091a15c128525dabdcfcd4bb38a5c57bb8/spell4checker-0.0.1.tar.gz",
"platform": null,
"description": "### Spell-Checker: Wrote studying LeetCode 75 Problems\r\n\r\n#### Introduction\r\n\r\nWriting Spell-checker is a challenge due to the complicated nature of searching and matching correct matches of user written words. Thus, providing correct spellings. \r\n\r\n[StackOverflow](https://stackoverflow.com/questions/2294915/what-algorithm-gives-suggestions-in-a-spell-checker) and [Wikipedia](https://en.wikipedia.org/wiki/Levenshtein_distance) offer in-depth knowledge in writing a spell-checker but are quite limited and outdated. It\u00e2\u20ac\u2122s quite difficult to reverse engineer the spell checker ones present in Windows 11 by default. Including spell-checker has fundamental rules and later others tweak them to make it faster and add more features. \r\n\r\nEstablishing no prior rules how it should work, and present Neural Spell Checkers being prominent in Grammarly and Google Docs, I went on quest to write a spell checker from scratch using my understanding of Algorithms specifically LeetCode problems I solved in the past couple of weeks and reading through Articles. \r\n\r\n#### Structure of SpellChecker\r\n\r\nA unique and similar structure of past and present spell checkers were derived while designing this Algorithm. Starting \r\n\r\n1. A Prefix Tree search Algorithm to load every word from the dictionary into its respective nodes\r\n2. Iterating over the words and using Longest Common Sequence (LCS) to find most likely match for the input word\r\n3. Edit Distance (Levenshtein Distance) to determine the perfect match and returning result. \r\n\r\nWord with highest LCS and lowest Edit distance is determined as a perfect match. \r\n\r\n#### Learning outcomes\r\n\r\nPractising LeetCode concepts in a real world project is valuable. Including better understanding how different Algorithms come into play and work to solve a critical problem in a unified manner. And showcasing problem solving and creativity traits. \r\n\r\n##### LeetCode Problems (used)\r\n1. Edit Distance \r\n2. Longest Common Sequence \r\n3. Implement a Trie \r\n\r\nThese were part of LeetCode 75 Problems. https://leetcode.com/studyplan/leetcode-75/\r\n\r\n##### Critical Pointers\r\n1. I don\u00e2\u20ac\u2122t provide UI and interface to interact with the algorithm. A terminal interface needs to be utilised. \r\n2. A Public dictionary dataset was used. \r\n3. The clearest explanation of Spell Checker Algorithm and Code on the Internet. \r\n4. Time Complexity O(n * m * (m + m))\r\n\r\n**Consider star the repository if it helps you!**\r\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.0.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "72875389239721cace83a720fc510e31603c52d3b0b43f4b5a0b2d036e836456",
"md5": "e65328f70388ec7c359699f656fd66fe",
"sha256": "993df0558990d83177c9e22eac7cb9a85474dd22207fe30e420b98a4f9d4604a"
},
"downloads": -1,
"filename": "spell4checker-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e65328f70388ec7c359699f656fd66fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3405,
"upload_time": "2024-04-17T08:29:18",
"upload_time_iso_8601": "2024-04-17T08:29:18.930587Z",
"url": "https://files.pythonhosted.org/packages/72/87/5389239721cace83a720fc510e31603c52d3b0b43f4b5a0b2d036e836456/spell4checker-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d10bd8f9bfd261a8689292b1f86a7c091a15c128525dabdcfcd4bb38a5c57bb8",
"md5": "5fc9cc896204170c19fb0076ee5594de",
"sha256": "8236cdc69a5c7d0be56ac455f7ad7ad11689eba1f6520217a73d5402205dd0f2"
},
"downloads": -1,
"filename": "spell4checker-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5fc9cc896204170c19fb0076ee5594de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3053,
"upload_time": "2024-04-17T08:29:20",
"upload_time_iso_8601": "2024-04-17T08:29:20.553172Z",
"url": "https://files.pythonhosted.org/packages/d1/0b/d8f9bfd261a8689292b1f86a7c091a15c128525dabdcfcd4bb38a5c57bb8/spell4checker-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-17 08:29:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "spell4checker"
}