Commit
·
bcc9686
1
Parent(s):
53a8c9e
adding city name and country in remove list
Browse files
app.py
CHANGED
@@ -56,13 +56,8 @@ def preprocess(text):
|
|
56 |
# Convert to uppercase
|
57 |
cleaned_text = cleaned_text.upper()
|
58 |
|
59 |
-
# Remove last word if it matches "PVT", "LTD", "INDIA"
|
60 |
-
last_word = cleaned_text.split()[-1]
|
61 |
-
if last_word in ["PVT", "LTD", "INDIA"]:
|
62 |
-
cleaned_text = " ".join(cleaned_text.split()[:-1])
|
63 |
-
|
64 |
# Remove unwanted words
|
65 |
-
words_to_remove = ["MPS", "POS", "BIL", "ONL"]
|
66 |
cleaned_text = " ".join([word for word in cleaned_text.split() if word not in words_to_remove])
|
67 |
|
68 |
# Convert to lowercase
|
|
|
56 |
# Convert to uppercase
|
57 |
cleaned_text = cleaned_text.upper()
|
58 |
|
|
|
|
|
|
|
|
|
|
|
59 |
# Remove unwanted words
|
60 |
+
words_to_remove = ["MPS", "POS", "BIL", "ONL", "BANGALORE", "PVT", "LTD", "INDIA", "LT"]
|
61 |
cleaned_text = " ".join([word for word in cleaned_text.split() if word not in words_to_remove])
|
62 |
|
63 |
# Convert to lowercase
|