Phettae commited on
Commit
542bb72
·
verified ·
1 Parent(s): 1026b11

Improve synthetic context consistency

Browse files
data/test.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
data/train.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
data/validation.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
scripts/generate.py CHANGED
@@ -63,8 +63,9 @@ def generate():
63
  for i in range(400):
64
  text = RNG.choice(pool)
65
  context = RNG.choice(["รีวิวร้านค้า", "ความคิดเห็นลูกค้า", "ข้อความหลังรับบริการ", "ประสบการณ์ผู้ใช้"])
66
- obj, place = RNG.choice(OBJECTS), RNG.choice(PLACES)
67
- q = f"จำแกควสึกเป็บวก กลาง หรืลบ\nระภทข้อวาม: {context}\nสิค้า: {obj}\nื้นี่: {place}\nข้ความ: {text}"
 
68
  rows.append(row("sentiment_classification", q, label, 0.98))
69
 
70
  # Translation with compositional but natural short sentences.
@@ -115,7 +116,9 @@ def generate():
115
  rows.append(row("summarization", f"สรุปข้อความต่อไปนี้เป็นหนึ่งประโยค: {text}", f"{actor}ใน{place}จัดกิจกรรม{topic} {weeks} สัปดาห์ให้ผู้เข้าร่วม {participants} คนเรียนรู้และนำไปใช้จริง", 0.93))
116
  for _ in range(500):
117
  topic, benefit = RNG.choice(TOPICS)
118
- audience, age = RNG.choice(["นักเรียน", "ผู้เริ่มต้น", "ผู้สูงอายุ", "คนทำงาน"]), RNG.randint(8, 70)
 
 
119
  rows.append(row("explanation", f"อธิบายประโยชน์ของ{topic}แบบเข้าใจง่ายสำหรับ{audience}อายุ {age} ปี", benefit, 0.95))
120
 
121
  # Formal rewriting and practical conversation.
 
63
  for i in range(400):
64
  text = RNG.choice(pool)
65
  context = RNG.choice(["รีวิวร้านค้า", "ความคิดเห็นลูกค้า", "ข้อความหลังรับบริการ", "ประสบการณ์ผู้ใช้"])
66
+ place, day = RNG.choice(PLACES), RNG.randint(1, 31)
67
+ channel = RNG.choice(["าร้", "แอปพลิเคชั", "โทรศัพท์", "แบบสบถาม"])
68
+ q = f"จำแนกความรู้สึกเป็น บวก กลาง หรือลบ\nประเภทข้อความ: {context}\nช่องทาง: {channel}\nพื้นที่: {place}\nวันที่: {day}\nข้อความ: {text}"
69
  rows.append(row("sentiment_classification", q, label, 0.98))
70
 
71
  # Translation with compositional but natural short sentences.
 
116
  rows.append(row("summarization", f"สรุปข้อความต่อไปนี้เป็นหนึ่งประโยค: {text}", f"{actor}ใน{place}จัดกิจกรรม{topic} {weeks} สัปดาห์ให้ผู้เข้าร่วม {participants} คนเรียนรู้และนำไปใช้จริง", 0.93))
117
  for _ in range(500):
118
  topic, benefit = RNG.choice(TOPICS)
119
+ audience = RNG.choice(["นักเรียน", "ผู้เริ่มต้น", "ผู้สูงอายุ", "คนทำงาน"])
120
+ age_ranges = {"นักเรียน": (8, 18), "ผู้เริ่มต้น": (18, 65), "ผู้สูงอายุ": (60, 85), "คนทำงาน": (20, 65)}
121
+ age = RNG.randint(*age_ranges[audience])
122
  rows.append(row("explanation", f"อธิบายประโยชน์ของ{topic}แบบเข้าใจง่ายสำหรับ{audience}อายุ {age} ปี", benefit, 0.95))
123
 
124
  # Formal rewriting and practical conversation.