Package Data | |
---|---|
Maintainer Username: | teepluss |
Maintainer Contact: | teepluss@gmail.com (Teepluss) |
Package Create Date: | 2014-11-21 |
Package Last Update: | 2014-11-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-17 03:00:13 |
Package Statistics | |
---|---|
Total Downloads: | 25 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Wordbreaker is a thai wording separator.
This package is just a wrapper from PhlongTaIam: PHP Thai word breaker
To get the lastest version of Wordbreaker simply require it in your composer.json
file.
"teepluss/wordbreaker": "dev-master"
You'll then need to run composer install
to download it and have the autoloader updated.
Once Wordbreaker is installed you need to register the service provider with the application. Open up app/config/app.php
and find the providers
key.
'providers' => array(
'Teepluss\Wordbreaker\WordbreakerServiceProvider'
)
Theme also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases
key of your app/config/app.php
file.
'aliases' => array(
'Wordbreaker' => 'Teepluss\Wordbreaker\Facades\Wordbreaker',
)
Publish config using artisan CLI.
php artisan config:publish teepluss/wordbreaker
// Append dictionary.
$source = [
'ทดสอบ',
'ประโยค',
'ภาษาไทย',
'ยาว',
'แตก',
'คำ'
];
Wordbreaker::add($source);
// Separate sentence into word.
$text = 'ทดสอบการแตกคำจากประโยคที่มีความยาว และติดกันมากๆ ในภาษาไทย';
$w = Wordbreaker::make($text);
var_dump($w);
If you have some problem, Contact teepluss@gmail.com