Khmer Phonemizer
A Free, Standalone and Open-Source Khmer Grapheme-to-Phonemes.
Installation
pip install khmerphonemizer
Usage
from khmerphonemizer import phonemize
text = "នៅលើលោកនេះមិនមានមនុស្សណាម្នាក់ចេះអស់ទេ"
result = phonemize(text)
print(result)
Output
(['នៅលើ',
'លោក',
'នេះ',
'មិន',
'មាន',
'មនុស្ស',
'ណា',
'ម្នាក់',
'ចេះ',
'អស់',
'ទេ'],
[['n', 'ɨ', 'w', 'l', 'əː'],
['l', 'oː', 'k'],
['n', 'i', 'h'],
['m', 'ɨ', 'n'],
['m', 'i', 'ə', 'n'],
['m', 'ɔ', 'n', 'u', 'h'],
['n', 'aː'],
['m', 'n', 'ĕ', 'ə', 'ʔ'],
['c', 'e', 'h'],
['ʔ', 'ɑ', 'h'],
['t', 'eː']])
Check out the examples/ for more examples.
API
-
phonemizeTokenize input text into words and phonemize each word and returns a tuple with tokens and phonemes.input_str: strText with multiple words.beam: int = 500number of beam search.min_beam: int = 100: minimum number of beam search.beam_score: float = 0.6beam search score.use_lexicon: bool = TrueUse lexicon dictionary for known words.
-
phonemize_singlePhonemize a single word.word: strText with single Khmer or English word only.beam: int = 500number of beam search.min_beam: int = 100: minimum number of beam search.beam_score: float = 0.6beam search score.use_lexicon: bool = TrueUse lexicon dictionary for known words.
License
MIT
References
Without these awesome projects from awesome people, this wouldn't be possible.
- Khmer Word Search: Challenges, Solutions, and Semantic-Aware Search (Rina Buoy and Nguonly Taing and Sovisal Chenda)
- CUNY-CL/wikipron (Kyle Gorman, Jackson Lee, and contributors, 2019)
- rhasspy/gruut (Michael Hansen et al., 2020)
- OpenFst (Kyle Gorman et al.)
- AdolfVonKleist/Phonetisaurus (Josef Novak et al., 2017)
Related
Metadata
Release files for khmerphonemizer 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| khmerphonemizer-0.0.3.tar.gz | 11.1 MB | Without provenance | Details for khmerphonemizer-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| khmerphonemizer-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for khmerphonemizer-0.0.3-py3-none-any.whl |
Total release size: 22.2 MB
Release files / khmerphonemizer-0.0.3.tar.gz
| Download URL | khmerphonemizer-0.0.3.tar.gz |
|---|---|
| Size | 11.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b0a5b1ec4e7d78986dde7960085ca0101c4830c945bb6bece6807dea1d6a9e9
|
|
BLAKE2b-256 checksum How to use checksums |
be006a46e4e0a9ceca4aa8701f8fdf97f1d35a18a14b5e76b557150c832fa3b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.1
|
Release files / khmerphonemizer-0.0.3-py3-none-any.whl
| Download URL | khmerphonemizer-0.0.3-py3-none-any.whl |
|---|---|
| Size | 11.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82441879e01c9d52671f806725b0ba53770bfaef9e7352df44d3efc01eda3588
|
|
BLAKE2b-256 checksum How to use checksums |
178cab921d5733033871952c569f33f80b366190ce4ced158240ac91c8fc6abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.1
|
Security for khmerphonemizer 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.