sgarbi commited on
Commit
b822a55
1 Parent(s): b18d8ef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md CHANGED
@@ -1,3 +1,85 @@
1
  ---
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
  license: mit
4
+ pipeline_tag: token-classification
5
+ tags:
6
+ - token-classification
7
+ - NER
8
+ widget:
9
+ - text: >
10
+ Food Name: GARLIC AND FINE HERBS
11
+ Brand: CELEBRITY
12
+ Food Category: Cheese
13
+ Ingredients: Goat's milk, garlic, herbs, sea salt, potassium sorbate, microbial enzyme, bacterial culture
14
+
15
+ Nutrition Facts per Serving (28g):
16
+
17
+ Calories: 250 kcal
18
+ Protein: 14.3g
19
+ Fat: 21.4g
20
+ Carbs: 0g
21
+ Sugars: 3.57g
22
+ Sodium: 571mg
23
+ Label Nutrition Facts:
24
+
25
+ Fat: 5.99g
26
+ Saturated Fat: 4g
27
+ Trans Fat: 0.199g
28
+ Cholesterol: 19.9mg
29
+ Sodium: 160mg
30
+ Protein: 4g
31
+ Calcium: 19.9mg
32
+ Calories: 70 kcal
33
+ Update Log:
34
+
35
+ Nutrient Added: Value 5
36
+ Nutrient Updated: Value 4
37
+
38
  ---
39
+
40
+ This is a BERT sequence labeling model, is designed for Named Entity Recognition (NER) in the context of FDA nutrition labeling. It aims to identify and classify various nutritional elements from text dataproviding a structured interpretation of the content typically found on nutrition labels.
41
+
42
+
43
+ ## Training Data Description
44
+
45
+ The training data for the `sgarbi/bert-fda-nutrition-ner` model was thoughtfully curated from the U.S. Food and Drug Administration (FDA) through their publicly available datasets. This data primarily originates from the FoodData Central website and features comprehensive nutritional information and labeling for a wide array of food products.
46
+
47
+ ### Data Source
48
+ - **Source**: U.S. Food and Drug Administration (FDA), FoodData Central.
49
+ - **Dataset Link**: [FDA FoodData Central](https://fdc.nal.usda.gov/download-datasets.html)
50
+ - **Content**: The dataset includes detailed nutritional data, such as ingredient lists, nutritional values, serving sizes, and other essential label information.
51
+
52
+ ### Preprocessing and Augmentation Steps
53
+ - **Extraction**: Key textual data, encompassing nutritional facts and ingredient lists, were extracted from the FDA dataset.
54
+ - **Normalization**: All text underwent normalization for consistency, including converting to lowercase and removing redundant formatting.
55
+ - **Entity Tagging**: Significant nutritional elements were manually tagged, creating a labeled dataset for training. This includes macronutrients, vitamins, minerals, and various specific dietary components.
56
+ - **Tokenization and Formatting**: The data was tokenized and formatted to meet the BERT model's input requirements.
57
+ - **Robustness Techniques**:
58
+ - **Introducing Noise**: To enhance the model's ability to handle real-world, imperfect data, deliberate noise was introduced into the training set. This included:
59
+ - **Sentence Swaps**: Random swapping of sentences within the text to promote the model's understanding of varied sentence structures.
60
+ - **Introducing Misspellings**: Deliberately inserting common spelling errors to train the model to recognize and correctly process misspelled words frequently encountered in real-world scenarios.
61
+
62
+ ### Relevance to the Model
63
+ - The use of a diverse and comprehensive dataset ensures that the model is well-equipped for nutritional NER tasks.
64
+ - The introduction of noise and sentence variations in the training data aids in building a more robust model, capable of accurately processing and analyzing real-world nutritional data that might contain imperfections.
65
+
66
+
67
+
68
+
69
+ ## Ethical Considerations
70
+
71
+ - The model was trained only on publicly available data from food product labels. No private or sensitive data was used.
72
+ - The model should not be used to make recommendations about nutrition or health - it only extracts nutritional entities from text. Any nutrition advice should come from qualified experts.
73
+ - The model may have biases related to the language and phrasing on certain types of food product labels. It should be re-evaluated periodically on new test sets.
74
+
75
+ ## Caveats and Recommendations
76
+
77
+ - The model may struggle with typos, uncommon ingredients, or unusual phrasing not seen during training.
78
+ - Performance should be monitored periodically, especially when applying the model to new types of text data.
79
+ - For best results, retrain the model on text data that matches the target use case.
80
+
81
+ Here are some example model outputs on the provided text:
82
+
83
+ {example_outputs}
84
+
85
+ Let me know if you would like me to expand or modify the model card draft in any way. I'm happy to incorporate any additional details you think are important to include.