File size: 546 Bytes
6ab8466
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""

test.py is a test script for the module.

"""
# %%

from neuspell import BertChecker

checker = BertChecker()
checker.from_pretrained(".")
# %%

test1 = "I luk foward to receving your reply"
test1_result = checker.correct(test1)  # correct a string

print(f"Original: {test1}", f"Corrected: {test1_result}", sep="\t")

test2 = [test1, "were did wendigo goe boating?", "I am a good at math"]
test2_result = checker.correct_strings(test2)  # correct a list of strings
print(f"Original: {test1}", f"Corrected: {test2_result}", sep="\t")


# %%