Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
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 |
|