thealper2 commited on
Commit
85bdc81
1 Parent(s): a8f817c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def preprocess_text(text):
29
  text = emoji.replace_emoji(text)
30
  text = ' '.join([word for word in text.split() if word.lower() not in stop_words])
31
  text = re.sub(r'(mısın|misin|musun|müsün)$', r' \1', ' '.join(re.sub(r'(mısın|misin|musun|müsün)$', r'\1', word) for word in text.split()))
32
- text = ' '.join(re.sub(r'(de|da)$', r' \1', word) for word in text.split())
33
  text = ' '.join([t for t in text.split() if len(t) > 1])
34
  return text
35
 
 
29
  text = emoji.replace_emoji(text)
30
  text = ' '.join([word for word in text.split() if word.lower() not in stop_words])
31
  text = re.sub(r'(mısın|misin|musun|müsün)$', r' \1', ' '.join(re.sub(r'(mısın|misin|musun|müsün)$', r'\1', word) for word in text.split()))
32
+ text = re.sub(r'\b(de|da)\b\s*', '', text)
33
  text = ' '.join([t for t in text.split() if len(t) > 1])
34
  return text
35