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

Support nutrients taxonomy #1748

Open
aleene opened this issue Apr 30, 2019 · 4 comments
Open

Support nutrients taxonomy #1748

aleene opened this issue Apr 30, 2019 · 4 comments
Assignees
Labels
✨ Feature Features or enhancements to Open Food Facts server Nutrients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies

Comments

@aleene
Copy link
Contributor

aleene commented Apr 30, 2019

Remove the nutrients (translations) from the food.pm file and replace them with a real taxonomy file (already created).

@teolemon teolemon added Nutrients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies ✨ Feature Features or enhancements to Open Food Facts server labels Jun 11, 2019
@teolemon
Copy link
Member

Would be very useful to get more translations

@aleene
Copy link
Contributor Author

aleene commented Jun 11, 2019

Can do with wikidata

@aleene
Copy link
Contributor Author

aleene commented Jun 13, 2019

This is pull request #1920

@stephanegigandet stephanegigandet self-assigned this Nov 26, 2021
@stephanegigandet
Copy link
Contributor

I'm working on it, it is quite complex as a lot of code needs to be changed and refactored.

stephanegigandet added a commit that referenced this issue Dec 3, 2021
… Ready for review (#6123)

* rename nutrients.txt to nutrients_old.txt

* rename nutrients.txt to nutrients_old.txt

* create script to generate nutrients taxonomy from Food.pm hardcoded values + nutrients_old.txt taxonomy

* update script

* rename iu / dv to iu_value / dv_value

* add xx: entry to all nutrients

* new nutrients taxonomy

* Small fixes to nutrients taxonomy

* use zz: entries for canonical nutrient taxonomy ids

* fix commas

* Start to use the nutrients taxonomy - #1748

* Start to use the nutrients taxonomy - #1748

* tests for PackagerCodes.pm

* add wikidata properties from nutrients_old.txt

* make canonicalize_nutriment() use the new nutrients taxonomy

* replacing %Nutriments by nutrients taxonomy

* fix typo

* fix compute_serving_size and tests

* fix nutrients suggestions

* fix serving size computation for nutrients

* fixes for units

* add missing added-sugars

* small fixes

* update test

* replace %Nutriment by nutrients taxonomy

* replace %Nutriment by nutrients taxonomy

* replace %Nutriment by nutrients taxonomy

* replace %Nutriment by nutrients taxonomy

* Remove %Nutriments from Food.pm as we now use the nutrients taxonomy

* fixed typo

* use new function from Tags.pm to get synonyms

* replace %Nutriment by nutrients taxonomy

* removing generate_nutrients_taxonomy.pl now that is has been used once

* update tests

* update tests

* fix test

* apply suggestions from code review

* remove old nutrients taxonomy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Features or enhancements to Open Food Facts server Nutrients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
Status: To discuss and validate
Development

No branches or pull requests

3 participants