CoolFace
Modelpublic

pimsoje/recipe-ner-small-bert-bio

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes7downloads
Model Card

Recipe NER Small BERT

This repository contains a compact BERT-style token classification model trained from scratch on a BIO-annotated recipe corpus.

What the model predicts

  • —NAME — ingredient names
  • —QTY — quantities
  • —UNIT — measurement units
  • —COMMENT — modifiers such as chopped / fresh / canned
  • —INDEX and RANGE_END — rare auxiliary labels from the source markup

Test metrics

  • —F1: 0.8828
  • —Precision: 0.8762
  • —Recall: 0.8895
  • —Accuracy: 0.8960

Usage

python
from transformers import pipeline

pipe = pipeline(
    "token-classification",
    model="recipe_ner_small_bert",
    tokenizer="recipe_ner_small_bert",
    aggregation_strategy="simple",
)

pipe("2 cups flour\n1 cup sugar\n1 tbsp olive oil")