The Thaichub2 (thai-chub-chub) Analysis Plugin integrates the Thai word segmentation modules into OpenSearch. Forked from : https://github.com/tlefsad/elasticsearch-analysis-thaichub2
-
Download a release zip from the release page matching your OpenSearch version.
-
Install with this command
./bin/opensearch-plugin install --batch file:///<path to zip>
- Restart OpenSearch
Sample request
POST _analyze
{
"analyzer": "thaichub2_analyzer",
"text": "นมตรามะลิ"
}
Result
{
"tokens" : [
{
"token" : "นม",
"start_offset" : 0,
"end_offset" : 2,
"type" : "word",
"position" : 0
},
{
"token" : "ตรา",
"start_offset" : 2,
"end_offset" : 5,
"type" : "word",
"position" : 1
},
{
"token" : "มะลิ",
"start_offset" : 5,
"end_offset" : 9,
"type" : "word",
"position" : 2
}
]
}
- Vee Satayamas for the Thai word segmentation library.