notyes / thsplitlib
Lib ตัดคำภาษาไทย สำหรับ PHP in composer
Installs: 315
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 29
pkg:composer/notyes/thsplitlib
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2025-10-09 01:09:49 UTC
README
Lib ตัดคำภาษาไทย สำหรับ PHP
How to use
include(dirname(FILE) . DIRECTORY_SEPARATOR . 'THSplitLib/segment.php');
$segment = new Segment();
$result = $segment->get_segment_array("คำที่ต้องการตัด");
echo implode(' | ', $result);
จะได้ Output คือ คำ | ที่ | ต้องการ | ตัด
ส่วนนี้ขออนุณาติปรับเข้าไปใส่ใน Composer นะครับ
use thsplitlib\Segment; require 'vendor/autoload.php'; $data = Segment(); $data->get_segment_array($text_to_segment);