Skip to content
Discussion options

You must be logged in to vote

ไฟล์นี้ไม่ได้ให้คะแนน STAR ครับ reply-parser.ts ทำหน้าที่แปลงคำตอบที่ผู้ใช้พิมพ์เองในหน้าสัมภาษณ์ ให้เป็นตัวเลือกที่ระบบรู้จัก เช่น

  • parseInterestReply() ใช้กับคำถามความสนใจ 30 ข้อ แปลงข้อความเป็นค่า Likert 1–5 เช่น "ชอบมาก" เป็น 5, "ไม่ชอบอย่างยิ่ง" เป็น 1 หรือพิมพ์ "4" ก็ได้
  • parseContextReply() ใช้กับคำถามบริบท 4 ข้อ (tier, cost, mobility, horizon) เช่น "ม.1-ม.3" เป็น LOWER_SECONDARY

ขั้นตอน (parseFromChoices)

  1. ตัดคำตอบที่ว่าง (empty) หรือยาวเกิน 160 ตัวอักษร (too_long)
  2. สร้างตารางค้นหาจาก label ไทยและอังกฤษของแต่ละตัวเลือก รวมกับรูปแบบตัวเลข (2, 2/5, ข้อ 2, ระดับ 2, option 2) และคำพ้องใน LIKERT_ALIASES / CONTEXT_ALIASES
  3. normalizeInterviewReply() ทำให้ข้อความอยู่ในรูปเดียวกันก่อนเทียบ: …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kong19565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants