Marco
commited on
Commit
·
ae274a8
1
Parent(s):
7116a22
update spell checker 2
Browse files- src/utilities.py +4 -2
src/utilities.py
CHANGED
@@ -10,7 +10,8 @@ from src.st_context import with_streamlit_context
|
|
10 |
class Utilities:
|
11 |
def __init__(self):
|
12 |
# Initialize the spell checker
|
13 |
-
self.spell = SpellChecker(language="en")
|
|
|
14 |
|
15 |
def fetch_likely_text(self):
|
16 |
"""Fetches likely text based on latest OCR values."""
|
@@ -31,7 +32,8 @@ class Utilities:
|
|
31 |
# Only consider detections with confidence above the threshold
|
32 |
if confidence > conf_thresh / 100.0:
|
33 |
# Correct the spelling of the detected text
|
34 |
-
corrected_text = self.correct_spelling(text)
|
|
|
35 |
# Append the bounding box and corrected text to annotations
|
36 |
annotations.append((box, corrected_text))
|
37 |
return annotations
|
|
|
10 |
class Utilities:
|
11 |
def __init__(self):
|
12 |
# Initialize the spell checker
|
13 |
+
# self.spell = SpellChecker(language="en")
|
14 |
+
pass
|
15 |
|
16 |
def fetch_likely_text(self):
|
17 |
"""Fetches likely text based on latest OCR values."""
|
|
|
32 |
# Only consider detections with confidence above the threshold
|
33 |
if confidence > conf_thresh / 100.0:
|
34 |
# Correct the spelling of the detected text
|
35 |
+
# corrected_text = self.correct_spelling(text)
|
36 |
+
corrected_text = text
|
37 |
# Append the bounding box and corrected text to annotations
|
38 |
annotations.append((box, corrected_text))
|
39 |
return annotations
|