pszemraj's picture
Update README.md
a6aa5e6
|
raw
history blame
1.09 kB
---
license: apache-2.0
---
# neuspell-scrnn-probwordnoise
> towards a reliable workaround for the `neuspell` lib being broken
- here, the `SclstmChecker()` would be used
## original usage
this one would use bert checker
```python
!pip install -U neuspell -q
data_folder = "/usr/local/lib/python3.7/dist-packages/neuspell"
import neuspell
from neuspell import *
""" select spell checkers & load """
# checker = SclstmChecker(pretrained=True)
# checker.from_pretrained()
# ^^are the standard method and broken
url = "https://www.dropbox.com/sh/7u160z9gvijnc06/AACf3RDpbFn76vKS-f5rzvxWa?dl=1" #@param {type:"string"}
!wget $url -O mychecker.zip
import os
target_dir = "/content/dl-checker"
os.makedirs(target_dir, exist_ok=True)
!unzip /content/mychecker.zip -d $target_dir
# checker3 = BertChecker()
checker4 = SclstmChecker()
checker4.from_pretrained(target_dir)
checker4.correct("I luk foward to receving your reply")
checker4.correct_strings(
["I luk foward to receving your reply",
"hooba dooba im like a pooba",
"were did wendigo goe goating?"]
)
```