Skip to main content

Một phiên bản tùy chỉnh của ViTokenizer để xử lý Tiếng Việt hiệu quả cho các dự án cụ thể.

Project description

Custom-Pyvi v1.0.9

Một phiên bản tùy chỉnh, gọn nhẹ của thư viện pyvi, tập trung vào chức năng Tách từ (Word Segmentation) và được tối ưu hóa cho các dự án cần xử lý Tiếng Việt chuyên ngành.

Tính năng chính

  • Gọn nhẹ: Loại bỏ các module không cần thiết như Gán nhãn từ loại (POS Tagging), Thêm dấu (Diacritics), chỉ giữ lại phần cốt lõi là ViTokenizer.
  • Tùy biến cao: Dễ dàng "dạy" thêm từ vựng mới bằng cách chỉnh sửa file models/words.txt để tăng độ chính xác cho lĩnh vực của bạn (ví dụ: thương mại điện tử, y tế, pháp luật...).
  • Hiệu quả: Kế thừa "bộ não" CRF mạnh mẽ từ pyvi gốc để đảm bảo khả năng tách từ ghép chính xác.

Cài đặt

pip install custom-pyvi

Sử dụng cơ bản

from custom_pyvi import ViTokenizer

text = "ghế bập bênh giá bao nhiêu?"
tokenized_text = ViTokenizer.tokenize(text)

print(tokenized_text)
# Kết quả mong đợi: ghế_bập_bênh giá bao_nhiêu ?

Tùy biến

Để cải thiện độ chính xác cho dự án của bạn, hãy mở file custom_pyvi/models/words.txt và thêm vào các từ ghép, thuật ngữ, tên sản phẩm... mà bạn muốn thư viện nhận diện. Mỗi cụm từ trên một dòng và các từ đơn cách nhau bằng dấu cách.

Ví dụ:

khung thép carbon
sơn tĩnh điện
da pu cao cấp

Lời Cảm Ơn (Acknowledgments)

Thư viện này được tinh chỉnh và tùy biến dựa trên mã nguồn mở của thư viện pyvi gốc. Xin chân thành cảm ơn tác giả trungtv đã tạo ra và chia sẻ một công cụ xử lý Tiếng Việt vô cùng hữu ích cho cộng đồng.

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

custom_pyvi-1.0.9.tar.gz (172.3 kB view details)

Uploaded Source

Built Distribution

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

custom_pyvi-1.0.9-py3-none-any.whl (168.8 kB view details)

Uploaded Python 3

File details

Details for the file custom_pyvi-1.0.9.tar.gz.

File metadata

  • Download URL: custom_pyvi-1.0.9.tar.gz
  • Upload date:
  • Size: 172.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for custom_pyvi-1.0.9.tar.gz
Algorithm Hash digest
SHA256 2824d94e2c8feaff3e9ccd04b43571adf77cd164eea2d3370b6a71ad29abff04
MD5 aea39f5431c39ab3addebaa15de682d8
BLAKE2b-256 89ef8246197b373cdbbb11e49b10e06d04327eb7cdad5e43e28ba12b592a30d1

See more details on using hashes here.

File details

Details for the file custom_pyvi-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: custom_pyvi-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 168.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for custom_pyvi-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3b89268b9e5d372e6545bad698aee6addf3e0d499202611e0d7b3907e530bf6a
MD5 bdccc4108904cf03f50e4685c5939127
BLAKE2b-256 311229ef10d87ccadc037c4c8687bfbb1cbe62bcc2db65793b3e2466b18b9ad5

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