BenjiELCA commited on
Commit
ef9c221
·
1 Parent(s): 813fdb6

add some character to cancel

Browse files
Files changed (1) hide show
  1. 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)