Skip to main content

Library to split sticked Vietnamese words

Project description

A library to split a string of many Vietnamese words sticked together to single words. It, for example, split “khuckhuyu” to “khuc” and “khuyu”. This library is not supposed to split Vietnamese by semantics, so it won’t differentiate single or compound words. It will not, for example, split “bacsitrongbenhvien” to “bac si” + “trong” + “benh vien”. If you want such a feature, please use underthesea. Due to my personal need, this library currently doesn’t process fully marked words, like “họamikhônghótnữa”. However, it is trivial for library user to strip those marks before passing to ViStickedWord.

To make convenient for programming, some terminologies are not used accurately like it should be in linguistic. Please don’t use my code as a source for learning Vietnamese grammar.

Thư viện để tách một chùm từ tiếng Việt viết dính liền thành các từ đơn riêng lẻ, ví dụ tách “khuckhuyu” thành “khuc”, “khuyu”. Thư viện này không có ý định tách từ dựa theo ngữ nghĩa, nên nó sẽ không phân biệt từ đơn, từ ghép của tiếng Việt. Ví dụ, nó sẽ ko tách cụm “bacsitrongbenhvien” thành “bac si” + “trong” + “benh vien”. Nếu bạn cần tính năng đó, nên sử dụng underthesea.

Do nhu cầu cá nhân nên hiện tại thư viện không xử lý từ có đầy đủ dấu, ví dụ “họamikhônghótnữa”. Tuy nhiên, người dùng thư viện có thể loại bỏ dấu trước khi truyền vào ViStickedWord. Việc đó không khó lắm.

Để thuận tiện cho việc lập trình, một số thuật ngữ không được dùng chính xác như cách dùng bên ngôn ngữ học. Vui lòng đừng xem code của tôi là nguồn tài liệu học ngữ pháp tiếng Việt.

Install

pip install vistickedword

Usage

from vistickedword import split_words

split_words('ngoannghoeo')

# Returns ('ngoan', 'nghoeo')

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

vistickedword-0.9.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vistickedword-0.9-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file vistickedword-0.9.tar.gz.

File metadata

  • Download URL: vistickedword-0.9.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b2 CPython/3.7.5rc1 Linux/5.3.0-19-generic

File hashes

Hashes for vistickedword-0.9.tar.gz
Algorithm Hash digest
SHA256 d63823805c0961c99cb7e4d1e47393381f440c24ae8edbff962c229bb86a12b4
MD5 370b7a31a1857f9248a632c325876313
BLAKE2b-256 9421c477f6cf3c15064585d095ee92c1684d41900d718aedfd0c0f57d2b2349e

See more details on using hashes here.

File details

Details for the file vistickedword-0.9-py3-none-any.whl.

File metadata

  • Download URL: vistickedword-0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b2 CPython/3.7.5rc1 Linux/5.3.0-19-generic

File hashes

Hashes for vistickedword-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2a2200932bcf04a32c46aaf22eb60ae6a5769d2c96d369262b8ef816a926f891
MD5 579aa440a5034addefbf8a614bda6425
BLAKE2b-256 02c62f15207bebe4655689942aa4316a4fa9390121505b6e09cd7c4432bef080

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