Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text-replacement to help special cases of ingredients #12

Closed
MarcusWolschon opened this issue Jan 23, 2022 · 0 comments
Closed

text-replacement to help special cases of ingredients #12

MarcusWolschon opened this issue Jan 23, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Priority: MEDIUM

Comments

@MarcusWolschon
Copy link
Owner

MarcusWolschon commented Jan 23, 2022

Describe the solution you'd like

Override the method https://github.com/hhursev/recipe-scrapers/blob/main/recipe_scrapers/_schemaorg.py#L139 in scrapers.py and cookidoo.py to replace some special speial cases before separating the ingredient into amount, unit, food and note:

  1. German unit "geh. TL", "geh. EL", "ges. TL" and "ges. TL" to get rid of the space and thus not parse the "EL" and "TL" as part of the ingredient name
  2. replace "(\d+) - (\d+)(.*)" with "\1\3 \1-\2" (e.g. "100 - 150 g Mehl" -> "100 g Mehl 100-150") to not have "-" become a unit and the food to become "150 g Mehl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Priority: MEDIUM
Projects
None yet
Development

No branches or pull requests

1 participant