Open CharlesNepote opened 4 years ago
@stephanegigandet
in lib/ProductOpener/DataQualityFood.pm
in the lines
(defined $product_ref->{product_name}) and $match_fr .= " " . $product_ref->{product_name}; (defined $product_ref->{product_name_fr}) and $match_fr .= " " . $product_ref->{product_name_fr};
I ll find the full product name ?
in which var is the brand name stored , is it $product_ref->{brands_tags}
Thanks for the help
@muskangarg21 : each product has a main language code, stored in $product_ref->{lc} then we can have the product name in different languages, in the field "productname" + [lc] . e.g. product_name_fr for French, product_name_en for English. The value for the main language is copied to "product_name".
The brand name is in the "brands" field. "brands_tags" is a canonical and comma separated version of "brands".
For this bug, it's probably best to use values in "brands", split them by comma, and check if they are contained in any of the "productname" + lc fields. You can get a list of all language codes for the products in the "languages" field (or languages_codes or something like that)
Stale issue message
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
Many people fill the brand in the product name. Example: https://world.openfoodfacts.org/product/5060358171024/lucia-popperley-s-cappucino-popcorn-ten-acre?rev=11
When the "brand" field is completed, we should be able to identify if the product name contains the given brand.
(I understand it's not a big issue.)