ใน ep นี้เราจะมาเรียนรู้ NLP ภาษาไทย กับการเริ่มต้นเรียนรู้การใช้งาน Library NLP ภาษาไทย ที่ดีที่สุดของภาษา Python ในปัจจุบัน คือ PyThaiNLP ที่จะเป็นพื้นฐานในการพัฒนาต่อยอดสร้างโมเดล Machine Learning ที่จะแก้ปัญหาด้าน NLP ที่ซับซ้อนขึ้นต่อไป

PyThaiNLP คืออะไร

pythainlp github page screenshot
pythainlp github page screenshot

PyThaiNLP คือ Library แพคเกจของภาษา Python ใช้สำหรับประมวลผลข้อความ และการวิเคราะห์ทางภาษา คล้ายกับ NLTK แต่ใช้กับภาษาไทยโดยเฉพาะ มีฟังก์ชันการทำงานที่หลากหลาย เช่น Character Set อักษรไทย คำไทย, เรียงคำภาษาไทย, Stop Words ภาษาไทย, ตัดคำภาษาไทย, วิเคราะห์ชนิดของคำทางไวยากรณ์, ตรวจตัวสะกด แก้คำผิด และอีกมากมาย ดังด้านล่าง

  • Convenient character and word classes, like Thai consonants (pythainlp.thai_consonants), vowels (pythainlp.thai_vowels), digits (pythainlp.thai_digits), and stop words (pythainlp.corpus.thai_stopwords) — comparable to constants like string.letters, string.digits, and string.punctuation
  • Thai word segmentation (word_tokenize), including subword segmentation based on Thai Character Cluster (subword_tokenize)
  • Thai transliteration (transliterate)
  • Thai part-of-speech taggers (pos_tag)
    Read out number to Thai words (bahttext, num_to_thaiword)
  • Thai collation (sort by dictionoary order) (collate)
  • Thai-English keyboard misswitched fix (eng_to_thai, thai_to_eng)
  • Thai spelling suggestion and correction (spell and correct)
  • Thai soundex (soundex) with three engines (lk82, udom83, metasound)
  • Thai WordNet wrapper
  • etc.

เรามาเริ่มกันเลยดีกว่า

Open In Colab

แชร์ให้เพื่อน:

Surapong Kanoktipsatharporn on FacebookSurapong Kanoktipsatharporn on LinkedinSurapong Kanoktipsatharporn on Rss
Surapong Kanoktipsatharporn
Solutions Architect at Bua Labs
The ultimate test of your knowledge is your capacity to convey it to another.

Published by Surapong Kanoktipsatharporn

The ultimate test of your knowledge is your capacity to convey it to another.