Changes

Jump to navigation Jump to search
m
no edit summary
Line 3: Line 3:     
In the database, this field is called <code>brands</code>.  
 
In the database, this field is called <code>brands</code>.  
 +
    
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Abrands issues related to <code>brands</code>].
 
See [https://github.com/openfoodfacts/openfoodfacts-server/issues?q=is%3Aissue+is%3Aopen+ingredients+label%3Abrands issues related to <code>brands</code>].
 +
 +
See also:
 +
 +
https://github.com/openfoodfacts/openfoodfacts-server/pull/4385
 
=== Suggested solution for the taxonomy ===
 
=== Suggested solution for the taxonomy ===
    
==== Short-term solution ====
 
==== Short-term solution ====
 +
Make brands language-less
 +
 +
Iif a brand has a translated name, in some countries then we consider it to be a different brand (in a lot of cases the products sold under those translated names will be different).
 +
 +
For products that display the brand in only one language, we just record that brand, and we display it as-is.
 +
 +
 +
==== Mid-term solution (to be defined/work in progress) ====
 
The taxonomy for brands should have following features:
 
The taxonomy for brands should have following features:
 
* a single brand is defined by a block of text and are separated by white lines;
 
* a single brand is defined by a block of text and are separated by white lines;
Line 13: Line 26:  
* a single line defines the brand in a specific language and country or an attribute. Each line starts with the '''key''' name followed by parameters and separated by a '''colon'''.
 
* a single line defines the brand in a specific language and country or an attribute. Each line starts with the '''key''' name followed by parameters and separated by a '''colon'''.
 
* a block can contain (mind the order):
 
* a block can contain (mind the order):
** (optional) a reference to a parent defined by "<" + the key and the first parameter of an existing brand. For example "<ab_cd:brand1" refers to the parent key "ab_cd:brand1, synonym_of_brand1". '''Remark:''' any attributes shared between the parent and the child only have to be specified in the parent, i.e., they are inherited by the child. Remark: if a reference to a parent is provided it should be the first line of the block.
+
** (optional) a reference to a parent defined by "<" + the key (as described above) and the first parameter of an existing brand. For example "<ab_cd:brand1" refers to the parent key "ab_cd:brand1, synonym_of_brand1". '''Remark:''' any attributes shared between the parent and the child only have to be specified in the parent, i.e., they are inherited by the child. '''Remark''': if a reference to a parent is provided it should be the first line of the block.
** (required) a key (''mn_op:'') - should be unique, so that we can distinguish between brands with the same name;
+
** (required) a key (as described above)''.'' For example: "''mn_op:''brand 1". It  should be unique, so that we can distinguish between brands with the same name.
** default (xx:) - a default value to be used for any language that is not specifically listed;
+
** (optional) a default key (xx_xx:) to be used for any language that is not specifically listed. It is always xx_xx. '''Remark''': if it is provided it should be the last line after all other languages.
** language (e.g. ''ru:'') - the brand-name in the language ''ru.'' A brand might be defined in multiple languages as needed, with a single line for each language. For instance the ru: might be used to specify a brand in Cyrillic. Sometimes also country specific brands are required.
+
** (optional) attributes - each brand can have one or more attributes. '''Remark:''' if provided attribute(s) should be the last line after all other languages and the default key (xx_xx):
** attributes - each brand can have one or more attributes
+
***
*** barcodeprefix:en: - the first 8(?) numbers of the barcode that belong to the brand. With this brands can be automatically assigned to a barcode. Also the barcodes of existing products can be checked;
   
*** wikipedia:en: - the full link to a page, which explains the brand(!!!). Note that brands are not well available on wikipedia;
 
*** wikipedia:en: - the full link to a page, which explains the brand(!!!). Note that brands are not well available on wikipedia;
 
*** wikidata:en: - the identifaction of the wikidata entry for the brand(!!). Note that brands are not well available on wikidata;
 
*** wikidata:en: - the identifaction of the wikidata entry for the brand(!!). Note that brands are not well available on wikidata;
*** brand_owner_opencorporates:xx: - an identification of the probable brand owner/distributor on [https://opencorporates.com/ opencorporates]. It is not always clear what should be written down here.
  −
*** idea: local customer service address (one for each country where the product is distributed, and a generic one)
  −
*** idea: eu trademark - maybe only useful for name trademarks? (not logo's). But not relevant to the consumer.
  −
*** idea: stores - the stores where the brand is sold. Maybe better to create a store taxonomy and link from there to brands?
     −
==== Mid-long-term solution ====
+
===== Example =====
 +
<blockquote>de_de:lidl
 +
 
 +
de_au:lidl
 +
 
 +
fr_fr:lidl
 +
 
 +
fr_be:lidl
 +
 
 +
hr_hr:lidl
 +
 
 +
xx_xx:lidl
 +
 
 +
wikipedia:en:<nowiki>https://en.wikipedia.org/wiki/Lidl</nowiki>
 +
 
 +
wikidata:Q151954
 +
 
 +
 
 +
<de_de:lidl
 +
 
 +
de_de:snack day
 +
 
 +
xx_xx:lidl</blockquote>
 +
 
 +
 
 +
In this example, we put de_de as first language because Lidl is a German company. Nevertheless, it should work the same starting with different language, at the condition that children refers to the parent accordingly.
 +
 
 +
==== Long-long-term solution (to be defined/work in progress) ====
 
Same as before, adding:
 
Same as before, adding:
   −
==== Example ====
+
* (optional) attributes
zz:laespanola<br>
+
** barcodeprefix:en: - the first 8(?) numbers of the barcode that belong to the brand. With this brands can be automatically assigned to a barcode. Also the barcodes of existing products can be checked;
 +
** brand_owner_opencorporates:xx: - an identification of the probable brand owner/distributor on [https://opencorporates.com/ opencorporates]. It is not always clear what should be written down here.
 +
** idea: local customer service address (one for each country where the product is distributed, and a generic one)
 +
** idea: eu trademark - maybe only useful for name trademarks? (not logo's). But not relevant to the consumer.
 +
** idea: stores - the stores where the brand is sold. Maybe better to create a store taxonomy and link from there to brands?
 +
 
 +
===== Example =====
 +
<blockquote>zz:laespanola<br>
 
xx:La Española<br>
 
xx:La Española<br>
 
barcodeprefix:en:8410226<br>
 
barcodeprefix:en:8410226<br>
Line 46: Line 88:  
brand_owner_opencorporates:BE:0838355558<br>
 
brand_owner_opencorporates:BE:0838355558<br>
 
wikidata:en:Q590921<br>
 
wikidata:en:Q590921<br>
<nowiki>#</nowiki>11 products @2022-04-23
+
<nowiki>#</nowiki>11 products @2022-04-23</blockquote>
    
=== Q&A ===
 
=== Q&A ===
Line 65: Line 107:  
*** '''<u>Solution:</u>'''  
 
*** '''<u>Solution:</u>'''  
 
*** For [https://nl.openfoodfacts.org/product/6971674070030/精制辣汤-唯滋亲 example], <code>The Laughing Cow</code> and <code>La vache qui rit</code>.
 
*** For [https://nl.openfoodfacts.org/product/6971674070030/精制辣汤-唯滋亲 example], <code>The Laughing Cow</code> and <code>La vache qui rit</code>.
*** '''<u>Solution:</u>''' they both belong to the same parent (<code>Bel Group</code>)
+
*** '''<u>Solution:</u>''' they both belong to the same parent (<code>Bel Group</code>). They can be en_us and fr_fr.
 
*** For [https://en.wikipedia.org/wiki/Wall%27s_(ice_cream) example], <code>Miko/wall's ice</code> creams, called <code>Frigo</code> in Spain but <code>Bresler</code> in Chile and Bolivia.
 
*** For [https://en.wikipedia.org/wiki/Wall%27s_(ice_cream) example], <code>Miko/wall's ice</code> creams, called <code>Frigo</code> in Spain but <code>Bresler</code> in Chile and Bolivia.
***<u>'''Solution'''</u>: '''make the taxonomy country specific instead of language specific?'''
+
***<u>'''Solution'''</u>: es_es:frigo and es_cl:bresler / es_bo:bresler will be on the same block
 
*** For example, The Coca-Cola Company sells <code>Fanta</code> in Thailand under <code>Fanta</code> and <code>แฟนต้า</code> names.
 
*** For example, The Coca-Cola Company sells <code>Fanta</code> in Thailand under <code>Fanta</code> and <code>แฟนต้า</code> names.
 
*** For example, <code>Danone</code> sells mineral water in Morroco under both <code>عين سايس</code> and <code>aïn Saïss</code> names.
 
*** For example, <code>Danone</code> sells mineral water in Morroco under both <code>عين سايس</code> and <code>aïn Saïss</code> names.
 
*** For examples, Japanese/English (like <code>味の素</code>/<code>Ajinomoto</code>) or Chinese/English (<code>乐虎</code>/<code>Hi-Tiger</code>)
 
*** For examples, Japanese/English (like <code>味の素</code>/<code>Ajinomoto</code>) or Chinese/English (<code>乐虎</code>/<code>Hi-Tiger</code>)
***<u>'''Solution 1 (preferred)'''</u>: Synonyms  th: แฟนต้า, fanta  (+) they are at the same level of hierarchy  (-) only first synonym will be visible for users, have to opt for the most appropriate one (local language maybe?), or use both (eg: th: แฟนต้า / fanta, แฟนต้า, fanta)
+
***'''<u>Solution:</u>''' th_th:แฟนต้า/fanta, แฟนต้า, fanta in the same block as en_us:fanta
***<u>'''Solution 2:'''</u> different children for the same parent. Let's say we have parent "Coca Cola company", then we would have something like  xx: coca-cola company  <br /><xx: coca-cola company  xx: fanta th: fanta  <br /><xx: coca-cola company  xx: แฟนต้า  th: แฟนต้า  (+) Both should be visible for users  (-) we have two different entries for the "same" brand  (also by changing the website URL th.openfoodfacts -> world.openfoodfacts, we could see different names... Maybe  )
   
** Also synonyms. Product brand has changed over time.
 
** Also synonyms. Product brand has changed over time.
 
***<u>'''Solution'''</u>: use synonyms in the taxonomy.
 
***<u>'''Solution'''</u>: use synonyms in the taxonomy.
Line 90: Line 131:  
** For [https://world.openfoodfacts.org/brand/walkers example], <code>Walkers</code> represents 3 different brands ([https://world.openfoodfacts.org/product/5000328123509/choux-de-bruxelle-walkers 1], [https://world.openfoodfacts.org/product/0039047003569/luxury-rich-fruit-cake-walkers 2] and [https://world.openfoodfacts.org/product/5011555031222/chocolate-gingers-walkers 3])
 
** For [https://world.openfoodfacts.org/brand/walkers example], <code>Walkers</code> represents 3 different brands ([https://world.openfoodfacts.org/product/5000328123509/choux-de-bruxelle-walkers 1], [https://world.openfoodfacts.org/product/0039047003569/luxury-rich-fruit-cake-walkers 2] and [https://world.openfoodfacts.org/product/5011555031222/chocolate-gingers-walkers 3])
 
** For [https://world.openfoodfacts.org/brand/dove example], <code>Dove</code> is either cosmetic (from Unilever) or chocolates brand (from Mars)
 
** For [https://world.openfoodfacts.org/brand/dove example], <code>Dove</code> is either cosmetic (from Unilever) or chocolates brand (from Mars)
**<u>'''Solution'''</u>: having country specific brands would help as well as differencing Cervezas San Miguel and San Miguel. In long term we could have some set of rules like if it is San Miguel and category is Beers, then rename Cerezas San Miguel. Same for food vs cosmetic.
+
**<u>'''Solution'''</u>: In long term we could have some set of rules like if it is San Miguel and category is Beers, then rename Cerezas San Miguel. Same for food vs cosmetic.
 
** For [https://world.openfoodfacts.org/product/8712566099559/cornetto-enigma-chocolat-coeur-au-caramel-miko example], <code>Cornetto</code> is a sub-brand of both <code>Frigo</code> and <code>Miko</code> (see previous discussion)
 
** For [https://world.openfoodfacts.org/product/8712566099559/cornetto-enigma-chocolat-coeur-au-caramel-miko example], <code>Cornetto</code> is a sub-brand of both <code>Frigo</code> and <code>Miko</code> (see previous discussion)
 
** <u>'''Solution'''</u>: make <code>Cornetto</code> child of both brands.
 
** <u>'''Solution'''</u>: make <code>Cornetto</code> child of both brands.
Line 121: Line 162:  
** <u>'''Decision:'''</u>
 
** <u>'''Decision:'''</u>
 
* EAN manufacturer codes - is there an open database which we could use?
 
* EAN manufacturer codes - is there an open database which we could use?
* country code vs language code.
  −
** '''<u>comment @benbenben:</u>''' To tackle country specific brands (<nowiki>https://github.com/openfoodfacts/openfoodfacts-server/issues/2954</nowiki>), I would suggest to replace <language:> by <country:>. Because some names can differ per country instead of per languages (we can take the example of Miko/wall's ice creams (<nowiki>https://en.wikipedia.org/wiki/Wall%27s_(ice_cream))</nowiki> that are called Frigo in Spain but Bresler in Chile and Bolivia).  (+) that would make easier to detect if a product is in a wrong country based on the brand taxonomy  (-) not totally sure that we can do that technically, can we?  (-) it adds complexity because all other taxonomies have language code and only the brand taxonomy would have the country code  (+-) there may be some brands that divide a country in two (like Aldi), but not sure that it is an problem.
      
==== Observations summary ====
 
==== Observations summary ====
Line 157: Line 196:     
==== Help to collect brands ====
 
==== Help to collect brands ====
The AI of Open Food Facts, called [[Artificial Intelligence|Robotoff]], is trying to identify brands. The annotations made by Robotoff are provided to users, asking them to answer to a simple question. There are also used by [https://hunger.openfoodfacts.org/questions?type=brand Hunger Game]. Everyone can use Hunger Game, but be careful to the issues mentioned in this current page.
+
The AI of Open Food Facts, called [[Artificial Intelligence|Robotoff]], is trying to identify brands in several ways. We use OCR in combination with known values. We also have another technique using pure computer vision and annotations to create cluster of brands by visual similarity. The annotations made by Robotoff are provided to users, asking them to answer to a simple question. There are also used by [https://hunger.openfoodfacts.org/questions?type=brand Hunger Game]. Everyone can use Hunger Game, but be careful to the issues mentioned in this current page.
* on 2020-10-29, there were 43200 annotations and 22748 resting
+
* on 2020-10-29, there were 43200 annotations and 22748 remaining
* on 2020-11-17, there were 46911 annotations and 22720 resting
+
* on 2020-11-17, there were 46911 annotations and 22720 remaining
 +
* on 2020-11-17, there were ? and 57879 remaining
    
==== Know challenges ====
 
==== Know challenges ====
75

edits

Navigation menu