Spaces:
Running
Running
add some character to cancel
Browse files- modules/OCR.py +1 -1
modules/OCR.py
CHANGED
@@ -59,7 +59,7 @@ def text_prediction(image):
|
|
59 |
return ocr_result
|
60 |
|
61 |
def filter_text(ocr_result, threshold=0.5):
|
62 |
-
words_to_cancel = {"+",".",",","#","@","!","?","(",")","[","]","{","}","<",">","/","\\","|","-","_","=","&","^","%","$","£","€","¥","¢","¤","§","©","®","™","°","±","×","÷","¶","∆","∏","∑","∞","√","∫","≈","≠","≤","≥","≡","∼"}
|
63 |
# Add every other one-letter word to the list of words to cancel, except 'I' and 'a'
|
64 |
for letter in "bcdefghjklmnopqrstuvwxyz1234567890": # All lowercase letters except 'a'
|
65 |
words_to_cancel.add(letter)
|
|
|
59 |
return ocr_result
|
60 |
|
61 |
def filter_text(ocr_result, threshold=0.5):
|
62 |
+
words_to_cancel = {"-","--","---","+",".",",","#","@","!","?","(",")","[","]","{","}","<",">","/","\\","|","-","_","=","&","^","%","$","£","€","¥","¢","¤","§","©","®","™","°","±","×","÷","¶","∆","∏","∑","∞","√","∫","≈","≠","≤","≥","≡","∼"}
|
63 |
# Add every other one-letter word to the list of words to cancel, except 'I' and 'a'
|
64 |
for letter in "bcdefghjklmnopqrstuvwxyz1234567890": # All lowercase letters except 'a'
|
65 |
words_to_cancel.add(letter)
|