shivanis14
commited on
Commit
•
40013e0
1
Parent(s):
d33ae42
Update data_extractor.py
Browse files- data_extractor.py +1 -1
data_extractor.py
CHANGED
@@ -168,7 +168,7 @@ def find_product(product_name):
|
|
168 |
query = {"productName": {"$regex": re.compile(i, re.IGNORECASE)}}
|
169 |
products = collection.find(query)
|
170 |
for product in products:
|
171 |
-
brand_product_name = product['
|
172 |
#Remove repitition words that appear consecutively - Example - Cadbury cadbury dairy milk chocolate
|
173 |
if brand_product_name not in product_list:
|
174 |
product_list.append(brand_product_name)
|
|
|
168 |
query = {"productName": {"$regex": re.compile(i, re.IGNORECASE)}}
|
169 |
products = collection.find(query)
|
170 |
for product in products:
|
171 |
+
brand_product_name = product['productName'] + " by " + product['brandName']
|
172 |
#Remove repitition words that appear consecutively - Example - Cadbury cadbury dairy milk chocolate
|
173 |
if brand_product_name not in product_list:
|
174 |
product_list.append(brand_product_name)
|