Berea-CS-Courses / capstone-project-schweinsbergs

capstone-project-schweinsbergs created by GitHub Classroom
0 stars 0 forks source link

Compare user data vs. dataframe #19

Closed schweinsbergs closed 3 years ago

schweinsbergs commented 3 years ago

An oversight I found was within the comparison of the user's data and the dataframe's ingredients data. The problem is that there are things in the string that make it impossible to match.

For example, a peanut butter and jelly sandwich in my programs dataframe would look something like:

['5 tbsp jelly', '5 tbsp peanut butter', '2 slices of bread'] while a user is more likely to input ['bread', 'jelly', 'peanut butter']. While there are logical matches, I need to be able to parse them.

alfarozavalae commented 3 years ago

Have you considered doing substring matching instead of string matching? Here's an article with some methods that you might or might not heard about before. https://stackabuse.com/python-check-if-string-contains-substring/

alfarozavalae commented 3 years ago

The PR is approved so feel free to merge it and feel free to close this issue.