pszemraj commited on
Commit
4abe533
1 Parent(s): cfd4a92

Update README.md

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