This script tests the accuracy of the typo correction model by comparing the corrected text with the original text.
python main.pyStarting Typo Correction Accuracy Test
==================================================
Processing Dataset Item 1/5
------------------------------
Typo text char count: 469
Clean text char count: 497
Character Similarity: 1.000
Word Similarity: 1.000
Word Matches: 58/58
Processing Time: 1.51s
Processing Dataset Item 2/5
------------------------------
Typo text char count: 494
Clean text char count: 556
Character Similarity: 0.995
Word Similarity: 0.986
Word Matches: 62/63
Processing Time: 2.08s
Processing Dataset Item 3/5
------------------------------
Typo text char count: 462
Clean text char count: 523
Character Similarity: 0.999
Word Similarity: 0.985
Word Matches: 55/56
Processing Time: 1.76s
Processing Dataset Item 4/5
------------------------------
Typo text char count: 470
Clean text char count: 527
Character Similarity: 1.000
Word Similarity: 1.000
Word Matches: 55/55
Processing Time: 1.12s
Processing Dataset Item 5/5
------------------------------
Typo text char count: 495
Clean text char count: 560
Character Similarity: 0.997
Word Similarity: 0.993
Word Matches: 59/59
Processing Time: 1.40s
==================================================
OVERALL STATISTICS
==================================================
Total Items Processed: 5
Total Processing Time: 7.88s
Average Processing Time: 1.57s
Average Character Similarity: 0.998 (99.8%)
Average Word Similarity: 0.993 (99.3%)
Overall Word Accuracy: 0.993 (99.3%)
Total Words Matched: 289/291