--- language: - en license: cc-by-nc-4.0 tags: - token-classification - named-entity-recognition - bert - roberta - recipes - knowledge-augmented pretty_name: ReciFineGold size_categories: - 1K ![Screenshot 2026-01-29 at 13.48.41](https://cdn-uploads.huggingface.co/production/uploads/6725049d93b72c9eaf7e075e/Pc4uuOpiuQEM7R387hjf5.png) ## Entity Types The dataset defines the following semantic entity types that were adopted from the [Recipe Case Study Paper](https://www.dl.soc.i.kyoto-u.ac.jp/~tajima/papers/hmdata18yamakatawww.pdf), each representing a different aspects of the cooking process: | Entity Type | Definition | |---|---| | `FOOD` | Edible items, including both raw ingredients and intermediate products | | `TOOL` | Cooking tools such as *knives, bowls, pans* | | `DURATION` | Time durations in cooking (e.g., *20 minutes*) | | `QUANTITY` | Quantities associated with ingredients | | `ACTION_BY_CHEF` | Verbs for deliberate cook actions (e.g., *bring* in “Bring the mixture to a boil”) | | `ACTION_BY_CHEF_DISCONTINUOUS` | Non-contiguous parts of compound chef actions (e.g., *to a boil*) | | `ACTION_BY_FOOD` | Verbs where food is the agent (e.g., *melt, boil*) | | `ACTION_BY_TOOL` | Verbs denoting tool actions (e.g., *grind, beat*) | | `FOOD_STATE` | Descriptions of food’s state (e.g., *chopped, soft*) | | `TOOL_STATE` | Descriptions of tool readiness (e.g., *preheated, greased, covered*) | ## How to use models trained on this dataset ### Option 1 - Using the Knowledge Augmented and Entity Type-Specific (KAES) Models The ReciFine library provides a lightweight inference wrapper (`ReciFineNER`) that handles the KAES prompting and decoding. ```python # Install ReciFine (see repo for latest install instructions) pip install https://github.com/nuhu-ibrahim/ReciFine/archive/refs/tags/V1.zip from recifine.inferencing.inference import ReciFineNER ner = ReciFineNER.from_pretrained( model="recipebert", # recipebert, reciperoberta task_formulation="knowledge_guided", knowledge_type="question", # question, entity_type, example, definition, all ) text = "Add 2 cups of chopped onions and fry until golden." prediction = ner.process_text( text, entity_type="FOOD" # ACTION_BY_CHEF, ACTION_BY_CHEF_DISCONTINUOUS, ACTION_BY_FOOD, ACTION_BY_TOOL, DURATION, FOOD, FOOD_STATE, QUANTITY, TOOL, TOOL_STATE ) print(prediction) ``` ### Option 2 - Using the Traditional BIO-n NER The ReciFine library provides a lightweight inference wrapper (`ReciFineNER`) that handles extraction and decoding. ```python pip install https://github.com/nuhu-ibrahim/ReciFine/archive/refs/tags/V1.zip from recifine.inferencing.inference import ReciFineNER ner = ReciFineNER.from_pretrained( model="recipebert", # recipebert, reciperoberta task_formulation="traditional", ) text = "Add 2 cups of chopped onions and fry until golden ." prediction = ner.process_text( text ) print(prediction) ``` ## Quick links (documentation + notebook) - **ReciFine library (recommended):** training scripts, inference wrappers, and full documentation https://github.com/nuhu-ibrahim/ReciFine/tree/main - **Colab (end-to-end usage demo):** https://colab.research.google.com/drive/1CatH2YOhnOWf-VglprEgxONWRkrXRBXo?usp=sharing&authuser=1 ## Research Papers ### Knowledge-Augmented and Entity Type-Specific Token Classification The knowledge-augmented and entity type-specific token classification model architecture is described in the paper **Knowledge Augmentation Enhances Token Classification for Recipe Understanding**. ```bibtex @inproceedings{ title = {Knowledge Augmentation Enhances Token Classification for Recipe Understanding}, author = {Ibrahim, Nuhu and Stevens, Robert and Batista-Navarro, Riza}, booktitle = {EACL}, year = {2026} } ``` ### ReciFine Datasets and Controllable Recipe Generation The ReciFine, ReciFineGold and ReciFineGen datasets are described in the paper **ReciFine: Finely Annotated Recipe Dataset for Controllable Recipe Generation**. ```bibtex @inproceedings{ title = {ReciFine: Finely Annotated Recipe Dataset for Controllable Recipe Generation}, author = {Ibrahim, Nuhu and Ravikumar, Rishi and Stevens, Robert and Batista-Navarro, Riza}, booktitle = {EACL}, year = {2026} } ```