Skip to content

Commit

Permalink
Updated Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tlefsad committed Jul 20, 2020
1 parent 2aef2d8 commit 4263f53
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,56 @@

The Thaichub2 (thai-chub-chub) Analysis Plugin integrates the Thai word segmentation modules into Elasticsearch.

## Installation on Elasticsearch 7.6.2

Download a release zip from the [release page]() matching your ES version.

```sh
./bin/elasticsearch-plugin install --batch file:///<path to zip>
```

## Sample Usage

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
}
]
}
```

## Thanks to
- [Vee Satayamas](https://github.com/veer66) for a Thai word segmentation library.

0 comments on commit 4263f53

Please sign in to comment.