SWATH (Smart Word Analysis for Thai)

————-
SWATH (Smart Word Analysis for THai)
————-
ผู้พัฒนาเวอร์ชั่นแรก

ผู้นำมาพัฒนาต่อ (ตอนนี้เวอร์ชั่น 0.4.1)

Windows Version

————-
libdatrie
————-

อื่นๆ

โปรแกรมตัดคำภาษาไทย SWATH

โปรแกรมการตัดคำภาษาไทยที่สามารถเลือกวิธี การตัดคำได้สองวิธี คือ การตัดคำแบบเลือกคำที่ยาวที่สุด(longest matching) และการตัดคำโดยเลือกแบบเหมือนมากที่สุด (maximal matching algorithms) ซึ่งนอกเหนือจากการใช้งานได้ดีกับข้อความที่เป็น text ธรรมดา โปรแกรมยังสามารถ รองรับไฟล์ในรูปแบบต่างๆ ได้แก่ html, rtf

ที่มา: โปรแกรมตัดคำภาษาไทย

Python เรียกใช้ Command line

การเรียกใช้ command line จาก Python สามารถเรียกได้โดยใช้คำสั่ง popen
import os
ipFile = “ip.txt”
opFile = “op.txt”
cmd = ‘swath <%s> %s’ % (ipFile, opFile)
f = os.popen(cmd)

หรือใช้ Popen
import subprocess
subprocess.Popen([r”gzip”,”-d”, “x.txt.gz”]).wait()

ที่มา: Subprocess managementMaking System Calls in Perl and Python