CoolFace
Datasetpublic

nassimjp/food-safety-classifications-pashto

🥗 Food‑Safety‑Classifications‑Pashto Pashto Dataset for Food‑Safety Statement Classification & SFT Conversation Generation 📌 Overview Food‑Safety‑Classifications‑Pashto یو Pashto ژبنی ډیټاسټ دی چې پکې د خوراکي خوندیتوب په اړه جملې شاملې دي، او هره جمله د صحت/خوندیتوب د اعتبار له مخې طبقه بندي شوې ده. هره کرښه په اصل کې داسې ده: {"text": "...", "label": 0} {"text": "...", "label": 1} label = 0 → جمله سمه ده (Correct) label = 1 → جمله ناسمه ده (Incorrect) دا… See the full description on the dataset page: https://huggingface.co/datasets/nassimjp/food-safety-classifications-pashto.

sourceHugging Faceupdated 1mo agoView on Hugging Face
0likes12downloads
Dataset Card

🥗 Food‑Safety‑Classifications‑Pashto

Pashto Dataset for Food‑Safety Statement Classification & SFT Conversation Generation


📌 Overview

Food‑Safety‑Classifications‑Pashto یو Pashto ژبنی ډیټاسټ دی چې پکې د خوراکي خوندیتوب په اړه جملې شاملې دي، او هره جمله د صحت/خوندیتوب د اعتبار له مخې طبقه بندي شوې ده.

هره کرښه په اصل کې داسې ده:

json
{"text": "...", "label": 0}
{"text": "...", "label": 1}
  • —label = 0 → جمله سمه ده (Correct)
  • —label = 1 → جمله ناسمه ده (Incorrect)

دا ډیټاسټ د classification، safety alignment، او SFT conversation generation لپاره کارول کېږي.


🎯 Purpose

دا ډیټاسټ د لاندې کارونو لپاره جوړ شوی:

  • —د Pashto ژبې لپاره food‑safety classification models روزل
  • —د LLM safety alignment لپاره د غلطو/سمو جملو تشخیص
  • —د SFT supervised fine‑tuning لپاره د مکالموي بڼې تولید
  • —د Pashto ژبې لپاره د reasoning datasets پراخول
  • —د Talanda او نورو Pashto‑LLM پروژو لپاره د پاکو، معیاري ډیټاسټونو جوړول

📂 Dataset Structure

🔸 Original Format (JSONL)

هره کرښه داسې ده:

json
{"text": "It's okay to leave leftovers at room temperature for up to 2 hours before refrigerating them.", "label": 0}

🔸 SFT Conversation Format

د supervised fine‑tuning لپاره د مکالمې بڼه:

json
{
  "id": "000000",
  "messages": [
    {"role": "user", "content": "دا سمه ده چې پاتې شوي توکي د یخچال کولو دمخه تر 2 ساعتونو پورې د خونې په حرارت کې پریږدئ."},
    {"role": "assistant", "content": "هو، دا بیان سم دی."}
  ]
}

🧪 Example Entries

✔️ Correct Statement (label = 0)

json
{"text": "Leftovers can be safely kept at room temperature for up to 2 hours.", "label": 0}

❌ Incorrect Statement (label = 1)

json
{"text": "Raw chicken can be handled with the same utensils used for salads.", "label": 1}

🔧 Conversion Script (JSONL → SFT Conversations)

د Pashto SFT بڼه تولیدولو لپاره سکریپټ:

python
import json

input_path = "input.jsonl"
output_path = "sft_conversations.jsonl"

def convert_to_sft(text, label):
    if label == 0:
        messages = [
            {"role": "user", "content": text},
            {"role": "assistant", "content": "هو، دا بیان سم دی."}
        ]
    else:
        messages = [
            {"role": "user", "content": text},
            {"role": "assistant", "content": "نه، دا بیان ناسم دی."}
        ]
    return {"messages": messages}

with open(input_path, "r", encoding="utf-8") as fin, \
     open(output_path, "w", encoding="utf-8") as fout:

    for line in fin:
        if not line.strip():
            continue

        obj = json.loads(line)
        sft_obj = convert_to_sft(obj["text"], obj["label"])
        fout.write(json.dumps(sft_obj, ensure_ascii=False) + "\n")

📊 Dataset Statistics

FieldDescription
LanguagePashto
DomainFood Safety / Public Health
FormatJSONL
Labels0 = Correct, 1 = Incorrect
Use‑CasesClassification, SFT, Safety Alignment

🧰 Use Cases

  • —Food Safety Classification Models
  • —LLM Safety Alignment
  • —Pashto Reasoning Tasks
  • —Supervised Fine‑Tuning (SFT)
  • —Binary Classification Training
  • —Dataset Augmentation for Pashto NLP

📥 Loading the Dataset

python
from datasets import load_dataset

ds = load_dataset("nassimjp/food-safety-classifications-pashto")
print(ds["train"][0])

📜 License

This dataset is released under the MIT License.

You may use, modify, and distribute it freely with attribution.


🤝 Contributions

که غواړې چې نور Pashto food‑safety جملې، اصلاحات، یا مکالمې اضافه کړې، نو د Pull Request له لارې یې شریکولای شې.


🔗 Related Work

  • —Pashto SFT Dataset
  • —Pashto Safety Alignment
  • —Talanda NLP Framework