metadata
license: apache-2.0
datasets:
- empathyai/grocery-ner-dataset
language:
- en
base_model:
- gliner-community/gliner_large-v2.5
pipeline_tag: token-classification
library_name: gliner
tags:
- ner
- gliner
- groceries
Grocery Named Entity Recognition Model
A fine-tuned GLiNER model for identifying grocery items and food categories in text.
Model Description
This model is fine-tuned on the grocery-ner-dataset to identify 14 different categories of grocery items including fruits, vegetables, dairy products, and more.
Supported Entity Types
- Fruits Vegetables
- Lactose, Diary, Eggs, Cheese, Yoghurt
- Meat, Fish, Seafood
- Frozen, Prepared Meals
- Baking, Cooking
- Cereals, Grains, Canned, Seeds
- Breads
- Snacks, Pastries, Treats
- Frozen Desserts
- Hot Drinks, Chilled Drinks
- Alcoholic Drinks
- Spices, Sauces
- World Foods
- Dietary Restrictions, Health, Allergens, Lifestyle
Training Details
- Base Model: gliner-community/gliner_medium-v2.5
- Training Data: empathyai/grocery-ner-dataset
- Batch Size: 8
- Learning Rate: 5e-6
- Weight Decay: 0.01
- Focal Loss Parameters: alpha=0.75, gamma=2
- Training Strategy: Linear learning rate with 10% warmup
Usage Example
!pip install gliner
from gliner import GLiNER
# Load model
model = GLiNER.from_pretrained("empathyai/gliner_large-v2.5-groceries")
labels = [
"Fruits Vegetables",
"Lactose, Diary, Eggs, Cheese, Yoghurt",
"Meat, Fish, Seafood",
"Frozen, Prepared Meals",
"Baking, Cooking",
"Cereals, Grains, Canned, Seeds",
"Breads",
"Snacks, Pastries, Treats",
"Frozen Desserts",
"Hot Drinks, Chilled Drinks",
"Alcoholic Drinks",
"Spices, Sauces",
"World Foods",
"Dietary Restrictions, Health, Allergens, Lifestyle"
]
# Example text
text = "I need to buy milk, bread, and fresh apples"
# Get predictions
predictions = model.predict_entities(text, labels=labels)
print(predictions)
Limitations
- Optimized for English language text only
- Best performance on grocery shopping and food-related contexts
- May not recognize brand names or regional food items not present in training data