Generate a json with extended synonym as we build taxonomies #10742
Labels
API READ
All READ APIs include Product, Search…
API Refactor
API
Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…)
Data export
We export data nightly as CSV, MongoDB… See: https://world.openfoodfacts.org/data
🧬 Taxonomies
https://wiki.openfoodfacts.org/Global_taxonomies
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)
The text was updated successfully, but these errors were encountered: