File size: 630 Bytes
9189e38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pandas as pd
from algo import Algo
from db.db_utils import get_connection

if __name__ == "__main__":
    db_conn = get_connection()
    algo = Algo(db_conn)
    raw_file_name = 'MFB-2022-raw-data.csv'
    input_file_path = f'raw/{raw_file_name}'
    df_input = pd.read_csv(input_file_path)
    input_words = df_input['description'].astype(str).tolist()
    algo.match_words(input_words)
    # algo.match_words(["Cooked meat"])
    # algo.match_words(["Berry - Strawberry", "Berry - Blackberry", "strawberries, raw pineapples, bananas sliced thin", "milk, chocolate", "potatoes / tomatoes / oranges",])
    db_conn.close()