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 details)

Uploaded Source

File details

Details for the file tccseg-0.1.0.tar.gz.

File metadata

  • Download URL: tccseg-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3

File hashes

Hashes for tccseg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7280b6e7c6dcb06e3b8fc8a89a50e2de844245dc2efe2e76aa79691cbd4b9e7d
MD5 6cd4b47986809a460534fe3d3d7982f6
BLAKE2b-256 c995d24b63ea666e5ef6b29fc1021a159fc5526f95b7817163ff579e780aa145

See more details on using hashes here.

Supported by

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