Skip to main content

Simple Thai Wordcut in Python using Maximum Matching

Project description

# pythaiwordcut - Thai Wordcut in Python

A simple Thai wordcut written in Python, based on Maximum Matching algorithm by [S. Manabu](http://www.aclweb.org/anthology/E14-4016)
. Uses Lexitron (by [NECTEC](http://www.sansarn.com/lexto/license-lexitron.php)) dictionary as default

> Please note: This project is under development and should not be use in production , all function and interface are subject to change. If you have issue or suggestion please feel free to ask, contribution is also very welcome :)

## Installation

```
pip install pythaiwordcut
```

or

```
git clone https://github.com/zenyai/pythaiwordcut.git
python setup.py install
```

## Usage
```
import pythaiwordcut as pwt

pt = pwt.wordcut(removeRepeat=True, stopword=False, removeSpaces=True, minLength=1, stopNumber=False)
print "|".join(pt.segment(u'ทดสอบการตัดคำ'))
```

* removeRepeat: remove intention insertion spelling error such as (สบายยยยยย)
* stopword: remove word that doesn't add sentiment value
* removeSpaces: remove blank space
* minLength: minimum length of each word
* stopNumber: remove number if exist

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythaiwordcut-0.1.4.tar.gz (218.4 kB view details)

Uploaded Source

File details

Details for the file pythaiwordcut-0.1.4.tar.gz.

File metadata

File hashes

Hashes for pythaiwordcut-0.1.4.tar.gz
Algorithm Hash digest
SHA256 03284eb40ce8988fc1aceaa1aad5866f9cbc4c792acb812b4528c1bdffdde4f0
MD5 176b639eb5fdf5853c516919c5f6449d
BLAKE2b-256 d18e7b541ce0c53890be25c79bad324731099fa46ffb12da0f6388a16292255f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page