Skip to main content

Polyphone disambiguation for g2p

Project description

g2pL

This is the official repository of our paper G2PL:LEXICON ENHANCED CHINESE POLYPHONE DISAMBIGUATION WITH A NEW DATASET

Install

pip install g2pL

Requirements

pip install -r requirements.txt

Download

点击此处下载模型及词向量等相关文件,将这些文件放入g2pL_files目录中。

Usage

You can set the tone style, the default tone style is 2.

from G2pL import G2PL

>>> g2p = G2PL()
>>> g2p("请您把这台收音机的音量调低一点。", 0)
['qing', 'nin', 'ba', 'zhe', 'tai', 'shou', 'yin', 'ji', 'de', 'yin', 'liang', 'tiao', 'di', 'yi', 'dian', '。']
>>> g2p("请您把这台收音机的音量调低一点。", 1)
['qǐng', 'nín', 'bǎ', 'zhè', 'tái', 'shōu', 'yīn', 'jī', 'de', 'yīn', 'liàng', 'tiáo', 'dī', 'yī', 'diǎn', '。']
>>> g2p("请您把这台收音机的音量调低一点。", 2)
['qing3', 'nin2', 'ba3', 'zhe4', 'tai2', 'shou1', 'yin1', 'ji1', 'de5', 'yin1', 'liang4', 'tiao2', 'di1', 'yi1', 'dian3', '。']

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

g2pL-0.0.19.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

g2pL-0.0.19-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file g2pL-0.0.19.tar.gz.

File metadata

  • Download URL: g2pL-0.0.19.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for g2pL-0.0.19.tar.gz
Algorithm Hash digest
SHA256 074b94219abc4052681e74c76371bb57bac69f63f25d1a05dc5a57ee9f3a1706
MD5 a38b54ae28a701698ed76b6b1efdf9e3
BLAKE2b-256 0417b2f5d1b98271d7dd8118538ca98bed3a48a24bd8f3f21f1f1991043432b6

See more details on using hashes here.

File details

Details for the file g2pL-0.0.19-py3-none-any.whl.

File metadata

  • Download URL: g2pL-0.0.19-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for g2pL-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a4454e18242c3fd06e10cf759d42a35bb75a7c34d2c29d86964f480cd76e16
MD5 7ea829b2f7c867ee32f19213a2ff8149
BLAKE2b-256 0c8818ebf1d7ef4cc4bf7d87d7a62579cc4c329cf765b66d7b250611afcbfcb2

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