Changes

Jump to navigation Jump to search
Line 128: Line 128:  
* '''Contaminated ingredients''' - a lot of products contain text that are not actual ingredients. Either this is caused by text recognition, which recognizes other elements as well. Or people add text that are not ingredients;
 
* '''Contaminated ingredients''' - a lot of products contain text that are not actual ingredients. Either this is caused by text recognition, which recognizes other elements as well. Or people add text that are not ingredients;
   −
== Maintenance ==
+
== Setup ==
In this section the actions and procedures for the maintenance of the taxonomies are described.
+
Adding a new language for ingredients to OFF, starts with the basics: adding a lot of translations. Without this, your language will not be recognised, handles and analysed. There are two ways to add these translations.
 +
=== Adding translations ====
 +
The basic translation work can be done by anyone with a web-browser. You can use the available web-interface for this. For example to translate the dutch ingredients, use this link: [https://world-nl.openfoodfacts.org/ingredients?translate=add]. In this url ''world'' stands for all products in the database and ''nl'' stands for those with dutch as a main language. And the go through the provided list of ingredients. Be careful, as you might easily introduce wrong translations, which are not actually used on ingredient lists.
 +
 
 +
=== Editing translations ====
 +
If you have experience with Github, you can edit the necessary files as well on your desktop. The ingredients are split over multiple files:
 +
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/ingredients.txt Ingredients taxonomy] - this file contains all the normal ingredients;
 +
* [https://github.com/openfoodfacts/openfoodfacts-server/blob/master/taxonomies/additives.txt Additives] - the file with all the additives;
   −
=== Bootstrap ===
+
=== Finetuning ===
 
Before starting with the maintenance action, it is first necessary to get the ingredients your language going. The next steps can be taken:
 
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):
 
* 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):
Line 149: Line 156:  
** 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é'''.
 
** 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).
 
You might require special handling, which in turn requires specific code. Please contact the OFF'ers on Slack for that (#ingredients).
* Systematically add the translations - you can use the available web-interface for this. For example to translate the dutch ingredients, use this link: [https://world-nl.openfoodfacts.org/ingredients?translate=add]. In this url ''world'' stands for all products in the database and ''nl'' stands for those with dutch as a main language. And the go through the provided list of ingredients. Be careful, as you might easily introduce wrong translations, which are not actually used on ingredient lists.
+
 
 +
== Maintenance ==
 +
In this section the actions and procedures for the maintenance of the taxonomies are described. Th
    
=== Actions ===
 
=== Actions ===
3,390

edits

Navigation menu