Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

pythai is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.3 Failed View build log
Windows (64-bit)
0.1.3 Failed View build log
Mac OS X (10.5+)
0.1.3 Failed View build log
Linux (32-bit)
0.1.3 Failed View build log
Linux (64-bit)
0.1.3 Failed View build log
 
Links
Author
License
GNU
Lastest release
version 0.1.3 on Jun 1st, 2013

Some basic python functions for working with the Thai language. For example:

```python import pythai

System Message: WARNING/2 (<string>, line 6); backlink

Inline literal start-string without end-string.

System Message: WARNING/2 (<string>, line 6); backlink

Inline interpreted text or phrase reference start-string without end-string.

pythai.split(u"การที่ได้ต้องแสดงว่างานดี") >>> u"การ ที่ ได้ ต้อง แสดง ว่า งาน ดี"

pythai.word_count(u"การที่ได้ต้องแสดงว่างานดี") >>> 8

pythai.contains_thai(u"hello") >>> False

pythai.contains_thai(u"helloการที่ไ") >>> True ```

System Message: WARNING/2 (<string>, line 18); backlink

Inline literal start-string without end-string.

System Message: WARNING/2 (<string>, line 18); backlink

Inline interpreted text or phrase reference start-string without end-string.

It's meant to be fast and efficient enough to handle large documents without breaking a sweat.

Includes

Currently the library supports these functions:

  • Word segmentation (split)
  • Word count (word_count) (faster than counting the result of split)
  • Whether a string contains Thai or not (contains_thai)

Installation

PyThai equires thailib to work. You can install it quite easily:

sudo apt-get install thailib

And then you can simply install pythai through pip:

pip install pythai

More

Special thanks to Vee Satayamas for the original python bindings of libthai from C.

This library was written for use in [Gengo](http://www.gengo.com). It's free and open-source under the GNU lesser public license. Any contributions are welcome!

Subscribe to package updates

Last updated Jun 1st, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.