Changes

Jump to navigation Jump to search
m
no edit summary
Line 6: Line 6:  
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>].
 
=== Suggested solution for the taxonomy ===
 
=== Suggested solution for the taxonomy ===
Taking the observations, use cases and design considerations into account, it is possible to specify how this can be encoded in a taxonomy. The same approach as all the other taxonomies will be used for thus.
     −
An overview of the encoding used in the brands taxonomy:
+
==== Short-term solution ====
* blocks/white lines - a single brand is defined by a block of text and are separated by white lines;
+
The taxonomy for brands should have following features:
* definition - a single line defines the brand in a specific language, an attribute, etc. Each line starts with a name followed by parameters and separated by a colon
+
* a single brand is defined by a block of text and are separated by white lines;
* parameters:
+
* use a four letters code separated by underscore -  '''<[https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes iso_639_language_code]> _<[https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes iso_3166_country_code]>''' - for the '''key'''. Example: fr_be, de_at.
** parent (<zz:, where zz is the [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes country code iso 3166]) - a reference to another (parent) brand. Thus any attributes shared between parent and child only have to be specified in the parent;
+
* 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'''.
** key (''zz:'') - should be unique, so that we can distinguish between brands with the same name;
+
* 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.
 +
** (required) a key (''mn_op:'') - 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;
 
** default (xx:) - a default value to be used for any language that is not specifically listed;
 
** 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.
 
** 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.
Line 24: Line 25:  
*** idea: eu trademark - maybe only useful for name trademarks? (not logo's). But not relevant to the consumer.
 
*** 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?
 
*** 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 ====
 +
Same as before, adding:
 +
 
==== Example ====
 
==== Example ====
 
zz:laespanola<br>
 
zz:laespanola<br>
76

edits

Navigation menu