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

How to handle ingredients in a parenthesized list #3617

Open
Tracked by #9096
AcuarioCat opened this issue Jun 13, 2020 · 6 comments
Open
Tracked by #9096

How to handle ingredients in a parenthesized list #3617

AcuarioCat opened this issue Jun 13, 2020 · 6 comments
Labels
🐛 bug This is a bug, not a feature request. 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis Spanish ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.

Comments

@AcuarioCat
Copy link
Contributor

AcuarioCat commented Jun 13, 2020

There are many occurrences of ingredients grouped into a parenthesized list, for example (Spanish)
acietes vegetales (girasol, oliva)

These are not correctly handled and give the individual ingredients rather than the adjective result.

This also applies to implied adjectives for example:
bicarbonatos sodico y amonico

Part of

@AcuarioCat AcuarioCat added the 🐛 bug This is a bug, not a feature request. label Jun 13, 2020
@aleene
Copy link
Contributor

aleene commented Jun 13, 2020

I think this was solved for other languages. @stephanegigandet is this a language dependent issue?

@stephanegigandet
Copy link
Contributor

There is some code to do it for French in Ingredients.pm, it needs to be made more generic so that we can handle other languages. Spanish is close enough to French so it should be reasonnably easy.

e.g. for French we have lists of prefixes and suffixes like that:

	my @prefixes_suffixes_list = (

huiles

[[
"huile",
"huile végétale",
"huiles végétales",
"matière grasse",
"matières grasses",
"matière grasse végétale",
"matières grasses végétales",
"graisse",
"graisse végétale",
"graisses végétales",
],
[
"arachide",
"avocat",
"chanvre",
"coco",
"colza",
"illipe",
"karité",

And "huiles (colza, tournesol et olive)" becomes "huile de colza, huile de tournesol, huile d'olive".

@stephanegigandet stephanegigandet added 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis Spanish labels Jun 13, 2020
@aleene
Copy link
Contributor

aleene commented Jun 13, 2020

Sounds like a role for a taxonomy. You do not want to do that in code for every language.

@AcuarioCat
Copy link
Contributor Author

Another instance I found is the following structure:
aceite de maravilla/ girasol alto oleico

I'm adding aciete de maravilla (South American word for sunflower)
Occurs here: 7802000008412

@AcuarioCat
Copy link
Contributor Author

It seems this also occurs for Portuguese, code 8480017087263:
trigo e arroz extrusado

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Jan 17, 2021
@teolemon teolemon removed the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Jul 19, 2021
Copy link
Contributor

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis Spanish ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.
Projects
Status: To do
Status: To discuss and validate
Development

No branches or pull requests

4 participants