Downloads · 30 days
20
1% of all-time downloads
sgarbi/bert-fda-nutrition-ner
bert-fda-nutrition-ner is a token classification model from sgarbi. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
This is a BERT model that is specifically designed for Named Entity Recognition (NER) in the field of nutrition labeling. Its main objective is to detect and categorize different nutritional components from textual da…
Downloads · 30 days
20
1% of all-time downloads
All-time downloads
3.2K
Public
Parameters
109M
436 MB on disk
Likes
14
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
This is a BERT model that is specifically designed for Named Entity Recognition (NER) in the field of nutrition labeling. Its main objective is to detect and categorize different nutritional components from textual data. By doing so, it provides a systematic understanding of the information generally found on nutrition labels and other nutritional materials.
This model was created as a benchmark and learning tool on training models from augmented data.
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.
label_map = {
0: 'O',
1: 'I-VITAMINS',
2: 'I-STIMULANTS',
3: 'I-PROXIMATES',
4: 'I-PROTEIN',
5: 'I-PROBIOTICS',
6: 'I-MINERALS',
7: 'I-LIPIDS',
8: 'I-FLAVORING',
9: 'I-ENZYMES',
10: 'I-EMULSIFIERS',
11: 'I-DIETARYFIBER',
12: 'I-COLORANTS',
13: 'I-CARBOHYDRATES',
14: 'I-ANTIOXIDANTS',
15: 'I-ALCOHOLS',
16: 'I-ADDITIVES',
17: 'I-ACIDS',
18: 'B-VITAMINS',
19: 'B-STIMULANTS',
20: 'B-PROXIMATES',
21: 'B-PROTEIN',
22: 'B-PROBIOTICS',
23: 'B-MINERALS',
24: 'B-LIPIDS',
25: 'B-FLAVORING',
26: 'B-ENZYMES',
27: 'B-EMULSIFIERS',
28: 'B-DIETARYFIBER',
29: 'B-COLORANTS',
30: 'B-CARBOHYDRATES',
31: 'B-ANTIOXIDANTS',
32: 'B-ALCOHOLS',
33: 'B-ADDITIVES',
34: 'B-ACIDS'
}
Here are some example model outputs on the provided text:
INPUT:
'Here are the ingredients to use: Tomato Paste, Sesame Oil, Cheese Cultures, Ground Corn, Vegetable Oil, Brown rice, sea salt, Tomatoes, Milk, Onions, Egg Yolks, Lime Juice Concentrate, Corn Starch, Condensed Milk, Spices, Artificial Flavor, red 5, roasted coffee'
Output:
['CLS', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-CARBOHYDRATES', 'I-CARBOHYDRATES', 'O', 'B-LIPIDS', 'I-LIPIDS', 'O', 'B-PROBIOTICS', 'I-PROBIOTICS', 'O', 'B-CARBOHYDRATES', 'I-CARBOHYDRATES', 'O', 'B-LIPIDS', 'I-LIPIDS', 'O', 'B-CARBOHYDRATES', 'I-CARBOHYDRATES', 'O', 'B-MINERALS', 'I-MINERALS', 'O', 'B-CARBOHYDRATES', 'O', 'B-PROXIMATES', 'O', 'B-CARBOHYDRATES', 'O', 'B-LIPIDS', 'I-LIPIDS', 'I-LIPIDS', 'I-LIPIDS', 'O', 'B-CARBOHYDRATES', 'I-CARBOHYDRATES', 'I-CARBOHYDRATES', 'O', 'B-CARBOHYDRATES', 'I-CARBOHYDRATES', 'I-CARBOHYDRATES', 'O', 'B-PROXIMATES', 'I-PROXIMATES', 'O', 'B-FLAVORING', 'O', 'B-FLAVORING', 'I-FLAVORING', 'O', 'B-COLORANTS', 'I-COLORANTS', 'O', 'B-STIMULANTS', 'I-STIMULANTS', 'O', 'I-STIMULANTS']