john-hu / untitled

0 stars 0 forks source link

Peeler hints #28

Open john-hu opened 2 years ago

john-hu commented 2 years ago

@FrancisZhuang I saw some unicode fraction symbols at the Foodista. We should write a module to convert those symbols to a string format or float format, like:

⅔ -> 2/3 = 0.67
2⅔ -> 2 + 2/3 = 2.67

Similar syntaxes also happen to the instruction field.

john-hu commented 2 years ago

Recipes at the Foodista may not have the size at the ingredients. I would suggest to mark this field as optional. How do you feel?

Like this: https://www.foodista.com/recipe/5W38XV82/chicken-parmigiana-giangi-s-kitchen-style

3 teaspoons dry marjoram
tomato sauce
fresh mozzarella
olive oil for frying
john-hu commented 2 years ago

We may need another module for guessing the temperature units, like 350º. It should be F, I think. And we should find a way to give a score to these kind of recipe and screen them out. I feel most of the recipes from the Foodista might not have a good score.

john-hu commented 2 years ago

I current start using the sqlite3. It may imply the peeler shouldn't run in parallel or high speed mode. It is true right now. But in the future, we may need to support multiple peeler instances running at the same time. At that time, we should switch sqlite3 to a modern database.

FrancisZhuang commented 2 years ago

@FrancisZhuang I saw some unicode fraction symbols at the Foodista. We should write a module to convert those symbols to a string format or float format, like:

⅔ -> 2/3 = 0.67
2⅔ -> 2 + 2/3 = 2.67

Similar syntaxes also happen to the instruction field.

the solution I used is "float(unicodedata.numeric(message))"