pszemraj commited on
Commit
a6aa5e6
1 Parent(s): 59b4fde

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md CHANGED
@@ -1,3 +1,53 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # neuspell-scrnn-probwordnoise
5
+
6
+ > towards a reliable workaround for the `neuspell` lib being broken
7
+
8
+
9
+
10
+ - here, the `SclstmChecker()` would be used
11
+
12
+
13
+ ## original usage
14
+
15
+
16
+ this one would use bert checker
17
+
18
+ ```python
19
+ !pip install -U neuspell -q
20
+
21
+ data_folder = "/usr/local/lib/python3.7/dist-packages/neuspell"
22
+
23
+
24
+ import neuspell
25
+ from neuspell import *
26
+
27
+
28
+ """ select spell checkers & load """
29
+ # checker = SclstmChecker(pretrained=True)
30
+ # checker.from_pretrained()
31
+ # ^^are the standard method and broken
32
+
33
+ url = "https://www.dropbox.com/sh/7u160z9gvijnc06/AACf3RDpbFn76vKS-f5rzvxWa?dl=1" #@param {type:"string"}
34
+
35
+ !wget $url -O mychecker.zip
36
+
37
+ import os
38
+ target_dir = "/content/dl-checker"
39
+ os.makedirs(target_dir, exist_ok=True)
40
+ !unzip /content/mychecker.zip -d $target_dir
41
+
42
+ # checker3 = BertChecker()
43
+ checker4 = SclstmChecker()
44
+ checker4.from_pretrained(target_dir)
45
+
46
+ checker4.correct("I luk foward to receving your reply")
47
+
48
+ checker4.correct_strings(
49
+ ["I luk foward to receving your reply",
50
+ "hooba dooba im like a pooba",
51
+ "were did wendigo goe goating?"]
52
+ )
53
+ ```