openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
611 stars 357 forks source link

Quality facet - Products that should not be in French, based on their brand #2954

Open teolemon opened 4 years ago

teolemon commented 4 years ago

What

IT_only_brands = {
Conad
}

ES_only_brands = {
    Hacendado,
    Coviran
}

DE_only_brands = {
    REWE,
}

NL_only_brands = {

}

for product in all_openfoodfacts_products:
    if product.brand in IT_only_brands and product.language_count==1 and "en:French" in product.language:
        write_quality_facet(italian-products-stored-in-french)
        transfer_language(italian, french, product.code)

https://world.openfoodfacts.org/brand/conad/languages image

Code pointer

lib/ProductOpener/DataQuality*.pm

Part of

github-actions[bot] commented 4 years ago

Stale issue message

benbenben2 commented 1 year ago

That would be only for brands that are in a single country. What about the others brands that are in more than a single country?

Do you think that having a list of all brands, each containing a list of countries where they are established may be another option?

Kaufland:

  • de (using language ISO 639-1 abbreviation for languages)
  • pl
  • cs
  • ro
  • sk
  • bg
  • hr

Rewe:

  • de

Currently, 156 350 brands are referenced: https://world.openfoodfacts.org/brands