Skip to main content

บันทึกการเปลี่ยนแปลง

การเปลี่ยนแปลงสำคัญทุกรายการของ kham ตาม Keep a Changelog และ Semantic Versioning

v0.5.0 2026-04-26 Release ↗

เพิ่มเติม — kham-pg

  • kham_fts_dict — custom dictionary template ขยาย token ภาษาไทย/Named แต่ละตัวเป็น lexeme สูงสุด 6 รายการ: คำ normalized, รหัส lk82 Soundex และ RTGS romanization รองรับการค้นหาแบบ phonetic-fuzzy และ Latin-script
  • รองรับ ts_headline — callback kham_headline ลงทะเบียนเป็น HEADLINE function มี 5 regress tests
  • Named entity token typeTokenKind::Named(_) → 7 ลงทะเบียนใน kham_lextypes

แก้ไข — kham-pg

  • PG 16+ lexize calling convention — arg3 ใน kham_dict_lexize เป็น List* บน PG 16+ ไม่ใช่ bool เดิมทำให้ทุก token ถูก discard เป็น stopword ส่งผลให้ tsvector ว่างเปล่า
v0.4.0 2026-04-25 Release ↗

เพิ่มเติม

  • Thai phonetic encoding — โมดูล soundex: lk82, udom83, metasound, thai_english_soundex
  • CLI --soundex — รหัส phonetic ปรากฏใน field syn= ของ FTS output
  • Accuracy benchmarkkham-bench-accuracy: P/R/F1 ระดับขอบเขตคำ, --threshold CI gate
  • ขยายข้อมูล — NE gazetteer +17,240 รายการ Wikipedia + +8,980 นามสกุลไทย → 36,600 รายการ POS table +8,691 รายการ ORCHID → ~9,000 รายการ
  • ลดขนาด binary — บีบอัด tnc_freq.txt, ne_th.tsv, pos_th.tsv ด้วย zlib ตอน compile time

เปลี่ยนแปลง — breaking

  • Compound-first DP scoring — เปลี่ยนลำดับ priority ใน DpScore: ลด token count มี priority 2 (เหนือกว่าการเพิ่ม dict match) แก้ปัญหา over-segmentation คำประสม Micro F1: 0.418 → 0.975, ประโยคที่ตรงกับ PyThaiNLP newmm: 1/39 → 37/39 (94.9%)
v0.3.0 2026-04-25 Release ↗

เพิ่มเติม

  • โมดูล abbrevAbbrevMap พร้อม TSV ในตัว 118 รายการ (เดือน, ยศ, หน่วยงาน, เขตกรุงเทพฯ) ขยายคำย่อก่อนตัดคำแบบ greedy longest-first
  • โมดูล date — normalize วันที่ภาษาไทย: 7 รูปแบบ input, พ.ศ./ค.ศ., output เป็น ISO 8601
  • โมดูล sentence — ตัดประโยคภาษาไทย: ตัวจบประโยคไทย, ไปยาลน้อย, เครื่องหมายสากล, กฎจุดคำนึงถึงทศนิยม/คำย่อ
v0.2.0 2026-04-24 Release ↗

เพิ่มเติม

  • Named Entity RecognitionNeTagger: gazetteer-based, greedy longest-match, 5 token พร้อมกัน NE gazetteer 10,488 รายการ Person / Place / Org
  • POS TaggingPosTagger: lookup-based, 338 รายการ, 13 หมวดหมู่จาก ORCHID
  • RTGS RomanizationRomanizationMap: ตาราง Thai → Roman 415 รายการ
  • Number normalization — แปลงตัวเลขและข้อความตัวเลขภาษาไทย รวมถึงจำนวนเงินบาท
  • SQLite FTS5 extensionkham-sqlite: pipeline NLP ครบชุด, byte-accurate offsets สำหรับ highlight() และ snippet()
  • FTS pipelineFtsTokenizer builder รวม POS, NE, romanization, stopwords, synonym expansion ในรอบเดียว
v0.1.0 – v0.1.3 2026-04-18 – 2026-04-19
v0.1.3 — ชุด pg_regress สำหรับ PostgreSQL: 67 tests ใน 4 suite (kham_fts, kham_thai, kham_operators, kham_ranking)
v0.1.2 — PostgreSQL FTS extension (kham-pg): parser สำหรับ PG 17, 6 token types, make install + Docker regress โมดูล FTS: stopwords, synonyms, ngrams
v0.1.1 — ใบอนุญาต MIT OR Apache-2.0 dual license, pyproject.toml สำหรับ maturin
v0.1.0 — เวอร์ชันแรก: อัลกอริทึม DAG-based newmm, DARTS dictionary, TCC boundary detection, Unicode pre-tokenizer, zero-copy Token, Python (PyO3), WASM (wasm-bindgen), C FFI (cbindgen), CLI, criterion benchmarks