Skip to content

Generate a json with extended synonym as we build taxonomies #10742

Description

Problem

As we build taxonomies,
we export a json with taxonomy. This is very useful for third party applications that deals with open food facts data, and wants to run some analysis based on taxonomies.
For example, this is used by robotoff and search-a-licious.

As reported on https://wiki.openfoodfacts.org/Taxonomy_access, we currently have two versions: one with only synonyms, and one with additional properties.
But there is no export with extended synonyms (were we replace synonyms by synonyms), whereas it would be very useful to search-a-licious.

Proposed solution

Export a <taxonomy_name>.extended.json, which contains a extended_synonyms property with extended synonyms.

My guess is to avoid putting properties in it (to avoid file being too massive), one can download .extended and .full version if needed, the merge is easy to do.

Code pointers

It happens in Tags.pm, in build_taxonomies build_tags_taxonomy (at the end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

APIIssues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…)API READAll READ APIs include Product, Search…API RefactorData exportWe export data nightly as CSV, MongoDB… See: https://world.openfoodfacts.org/data🧬 Taxonomieshttps://wiki.openfoodfacts.org/Global_taxonomies

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions