Peter
🚸 add test script
6ab8466
raw
history blame contribute delete
546 Bytes
"""
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")
# %%