Speccco commited on
Commit
1bc9208
·
verified ·
1 Parent(s): 924c36d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -65,6 +65,8 @@ class ArabicProfanityTester:
65
  u"\u200D" # zero width joiner
66
  "]+", flags=re.UNICODE)
67
  text = emoji_pattern.sub(r'', text)
 
 
68
  # Remove extra whitespace
69
  text = re.sub(r'\s+', ' ', text).strip()
70
 
 
65
  u"\u200D" # zero width joiner
66
  "]+", flags=re.UNICODE)
67
  text = emoji_pattern.sub(r'', text)
68
+ # Remove English alphabets
69
+ text = re.sub(r'[a-zA-Z]', '', text)
70
  # Remove extra whitespace
71
  text = re.sub(r'\s+', ' ', text).strip()
72