g2pW: Mandarin Grapheme-to-Phoneme Converter

Checkpoints for g2pW, the official implementation of g2pW: A Conditional Weighted Softmax BERT for Polyphone Disambiguation in Mandarin (INTERSPEECH 2022).

Files

File Description SHA256
G2PWModel-v2.zip PyTorch checkpoint (best_accuracy.pth) with config and training log 6df5312e1a12587f648268960d84d5e380389851484fe64d0fe810c03cbdab97
G2PWModel-v2-onnx.zip ONNX model used by the g2pw Python package 699f3c1fd7fb0e2c2d49ed2486826fd5bff233fee7759350a91c3b49aedc4ed2

These files were previously hosted at https://storage.googleapis.com/esun-ai/g2pW/.

Usage

$ pip install g2pw
>>> from g2pw import G2PWConverter
>>> conv = G2PWConverter()  # downloads G2PWModel-v2-onnx.zip from this repo
>>> conv('上校請技術人員校正FN儀器')
[['ㄕㄤ4', 'ㄒㄧㄠ4', 'ㄑㄧㄥ3', 'ㄐㄧ4', 'ㄕㄨ4', 'ㄖㄣ2', 'ㄩㄢ2', 'ㄐㄧㄠ4', 'ㄓㄥ4', None, None, 'ㄧ2', 'ㄑㄧ4']]

Manual download:

$ wget https://huggingface.co/YC-Chen/g2pW/resolve/main/G2PWModel-v2-onnx.zip
$ unzip G2PWModel-v2-onnx.zip

Citation

@inproceedings{chen22d_interspeech,
  title     = {g2pW: A Conditional Weighted Softmax BERT for Polyphone Disambiguation in Mandarin},
  author    = {Yi-Chang Chen and Yu-Chuan Steven and Yen-Cheng Chang and Yi-Ren Yeh},
  year      = {2022},
  booktitle = {Interspeech 2022},
  pages     = {1926--1930},
  doi       = {10.21437/Interspeech.2022-216},
  issn      = {2958-1796},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for YC-Chen/g2pW