Skip to main content

Thai Character Cluster segmentation python package

Project description

Thai Character Cluster Segmenter

tccseg

A tool for segmenting character clusters from unsegmented text, particularly for Thai language.

Installation (PyPI)

pip install tccseg

Usage (PyPI)

from tccseg.core import Core
segmenter = Core()
res = segmenter.segment("เธอคือพจนานุกรม")
# res: ['เธ', 'อ', 'คือ', 'พ', 'จ', 'นา', 'นุ', 'ก', 'ร', 'ม'])
segmenter = Core(cclib='original')
res = segmenter.segment("เธอคือพจนานุกรม")

Usage (dev)

usage: segmenter.py [-h] [--execute_mode {segment,interactive}] --input_data
                    INPUT_DATA [--cclib {original, cfcc}]

optional arguments:
  -h, --help            show this help message and exit
  --execute_mode {segment,interactive}, -x {segment,interactive}
                        Choose a mode from among 'segment' and 'interactive'
  --input_data INPUT_DATA, -i INPUT_DATA
                        Input data (text)
  --cclib {original, cfcc}
                        Specify Character Cluster library from among
                        'original' and 'cfcc' (Default: original)

Execute mode (See 'sample_scripts/' for more details)

  • segment: segment input data into character cluster
  • interactive: segment input text (stdin) into character cluster

Character Cluster Library (cclib)

  • original: Proposed by Theeramunkong et al. 2000. and revised by pythainlp
  • cfcc: soon

Acknowledgement

Thanaruk Theeramunkong, Virach Sornlertlamvanich, Thanasan Tanhermhong, and Wirat Chinnan. 2000. Character cluster based Thai information retrieval. In Proceedings of the fifth international workshop on on Information retrieval with Asian languages (IRAL ’00). Association for Computing Machinery, New York, NY, USA, 75–80. DOI:https://doi.org/10.1145/355214.355225
Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, & Pattarawat Chormai. (2016, Jun 27). PyThaiNLP: Thai Natural Language Processing in Python. Zenodo. http://doi.org/10.5281/zenodo.3519354

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

tccseg-0.1.0.tar.gz (4.0 kB view hashes)

Uploaded Source

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