Changes

Jump to navigation Jump to search
2,093 bytes removed ,  09:46, 20 June 2020
Line 147: Line 147:  
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/labels.txt Labels] - describe the nature (?) of the ingredient, i.e. organic, fair trade, etc;  
 
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/labels.txt Labels] - describe the nature (?) of the ingredient, i.e. organic, fair trade, etc;  
 
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/additives_classes.txt Additive classes] - each additive can be assigned to one or more additive class, which describes the role of the additive  in the product;
 
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/additives_classes.txt Additive classes] - each additive can be assigned to one or more additive class, which describes the role of the additive  in the product;
  −
=== Finetuning ===
  −
Before starting with the maintenance action, it is first necessary to get the ingredients your language going. The next steps can be taken:
  −
* Adapt file [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/lib/ProductOpener/Ingredients.pm ingredients.pm] - this file contains various elements, which are used to analyse the ingredients of a product (in the order they appear in the file):
  −
** Traces (''%may_contain_regexps'') - is the start of a phrase that introduces traces;
  −
** Allergens (''%contains_regexps'') - appears after an ingredient, to indicate an allergen;
  −
** Abreviations (''%abbreviations'') - commonly used abbreviations in ingredient lists;
  −
** Or (''%of'') - an optional choice between ingredients, eg '''colza or sunflower oil''';
  −
** And (''%and'') - two ingredients, not separated by a delimiter, eg '''herbs and spices''';
  −
** And of (''%and_of'') -
  −
** And/or (''%and_or'') -
  −
** The (''%the'') - the [https://en.wikipedia.org/wiki/The grammatical article] of the language.
  −
** Ignore after percent (''%ignore_strings_after_percent'') - a phrase that can be discard after it appears a %-sign;
  −
** Ignore phrases (''%ignore_regexps'') - phrases that can be ignored (black list);
  −
** Ingredients start (''%phrases_before_ingredients_list'') - this word is used as the beginning a the ingredient list, and helps OFF determine where the recognition should start.
  −
** Ingredients start all caps (''%phrases_before_ingredients_list_uppercase'') - For example in[https://static.openfoodfacts.org/images/products/002/222/420/0820/ingredients_en.4.full.jpg this ingredient list], the lis starts with '''INGREDIENTS''';
  −
** After ingredients (''%phrases_after_ingredients_list'') - an ingredient list can end in many different ways. These can be listed here;
  −
** Wrong dashes (%prefixes_before_dash) - this allows words separated by dash to be combined, eg '''demi - écrémé''', wil be changed to '''demi-écrémé'''.
  −
You might require special handling, which in turn requires specific code. Please contact the OFF'ers on Slack for that (#ingredients).
      
== Maintenance ==
 
== Maintenance ==
3,390

edits

Navigation menu