https://github.com/canggihpw/onlinespellchecker
A script to check spelling using google translate.
https://github.com/canggihpw/onlinespellchecker
google-translate spell-checker
Last synced: 7 months ago
JSON representation
A script to check spelling using google translate.
- Host: GitHub
- URL: https://github.com/canggihpw/onlinespellchecker
- Owner: canggihpw
- License: mit
- Created: 2017-08-15T13:53:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T09:53:26.000Z (about 8 years ago)
- Last Synced: 2025-01-21T10:22:13.799Z (9 months ago)
- Topics: google-translate, spell-checker
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Online Spell Checker
A script to check spelling using google translate.
## Requirements
* Python 2.7
* Selenium (https://pypi.python.org/pypi/selenium)## USAGE
Import the script
```
import OnlineSpellChecker
```
Get browser handler instance
```
hnd = OnlineSpellChecker.get_handler()
```
Browser supported: 0 - Chrome, 1 - Firefox, 2 - Safari, 3 - Opera, 4 - Edge
Call the function OnlineSpellChecker.spell_check(handler,list_of_word,language)
```
print OnlineSpellChecker.spell_check(hnd,["belng","rserch"],"en")
```## Example
With the following script
```
import OnlineSpellCheckerwordId = ["masyrkt","manosia","mskpun","bgimana","menjadekn","mengtakn","harimoa"]
wordEn = ["belng","rserch","apprximtion","whrever","mistke","abdemon","shllw"]hnd = spellchecker.get_handler(0)
print spellchecker.spell_check(hnd,wordEn,"en")
print spellchecker.spell_check(hnd,wordId,"id")
spellchecker.quit_browser(hnd)
```
The result is:
```
[['belng', u'belong'], ['rserch', u'research'], ['apprximtion', u'approximation'], ['whrever', u'wherever'], ['mistke', u'mistake'], ['abdemon', u'abdomen'], ['shllw', u'shallow']]
[['masyrkt', u'masyarakat'], ['manosia', u'manusia'], ['mskpun', u'meskipun'], ['bgimana', u'bagaimana'], ['menjadekn', u'menjadikan'], ['mengtakn', u'mengatakan'], ['harimoa', u'harimau']]
```## Accuracy
This technique still yields many mistakes. It is not accurate indeed, but it worths to try at least for the first step of word normalization. I am trying to improve it.## License
MIT License