Skip to content

Naming convention for consistency วิธีการตั้งชื่อไฟล์ #141

@bact

Description

@bact

ปัจจุบันไฟล์ใน pythainlp/corpus มีรูปแบบการตั้งชื่อที่ไม่สม่ำเสมอ
เสนอให้มีการใช้ชื่อที่สม่ำเสมอครับ เพื่อความสะดวกในการดูแลโค้ด (มีความคาดเดาได้บางอย่าง)

ตัวอย่าง

การใช้ _ หรือ - คั่นคำ

  • thaipos.py <- ไม่มีคั่น
  • thaipos.json <- ไม่มีคั่น, ชื่อไฟล์ข้อมูลเหมือนไฟล์โค้ด
  • thaiword.py <- ไม่มีคั่น
  • thaiword.txt <- ไม่มีคั่น, ชื่อไฟล์ข้อมูลเหมือนไฟล์โค้ด
  • thaisyllable.py <- ไม่มีคั่น
  • thai_syllable.txt <- มี _ คั่น, ชื่อไฟล์ข้อมูลไม่เหมือนไฟล์โค้ด (ต่างตรงการคั่น)
  • new-thaidict.txt <- มี - คั่น, ชื่อไฟล์ข้อมูลไม่เหมือนไฟล์โค้ด (ใช้คนละคำไปเลย dict vs word)
  • newthaiword.py <- ไม่มีคั่น

เอกพจน์หรือพหูพจน์

  • country.py <-- เอกพจน์
  • provinces.py <-- พหูพจน์
  • stopwords.py <- พหูพจน์
  • thaiword.py <- เอกพจน์

suffix/prefix แสดงภาษา

  • stopwords.py <- โค้ด ไม่ระบุภาษา
  • stopwords-th.txt <- ชุดข้อมูล ระบุภาษาด้วย th
  • thaiword.py <- โค้ด ระบุภาษาด้วย thai
  • thaiword.txt <- ชุดข้อมูล ระบุภาษาด้วย thai

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionasking questions/giving suggestions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions