Basic resource for Vietnamese NLP.
Project description
This package provides a simple tool for preprocessing Vietnamese text. It includes the following functions:
get_consonants()
: Returns a list of all Vietnamese consonants.
get_vowels()
: Returns a list of all Vietnamese vowels.
get_rhymes()
: Returns a list of all Vietnamese rhymes.
normalize(input_str)
: Converts the input string from various Vietnamese encodings to Unicode.
Installing
You can install the package using pip:
$ pip install vietnamese
Usage
Here's an example of how to use the package:
import vietnamese
consonants = vietnamese.get_consonants()
vowels = vietnamese.get_vowels()
rhymes = vietnamese.get_rhymes()
input_str = "Xin chµo!"
normalized_str = vietnamese.normalize(input_str)
print("Consonants:", consonants)
print("Vowels:", vowels)
print("Rhymes:", rhymes)
print("Input string:", input_str)
print("Normalized string:", normalized_str)
Contributing
If you find a bug or have a suggestion for a new feature, please open an issue on GitHub or submit a pull request.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for vietnamese-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f6f89cf2fd7fd839d83d8ad9d61adb475d78b07819e5fd32d874ff814658e1 |
|
MD5 | a12a69409ddf3727bb24166fb9785043 |
|
BLAKE2b-256 | 0896ba8ca35bf3d71f80799feb1e0be60b2fd2c75cc448a0012299ac6e965801 |