How to use the jaconv.z2h function in jaconv

To help you get started, we’ve selected a few jaconv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kensuke-Mitsuzawa / JapaneseTokenizers / JapaneseTokenizer / common / text_preprocess.py View on Github external
def denormalize_text(input_text):
    # type: (text_type)->text_type
    """* What you can do
    - It converts text into standard japanese writing way

    * Note
    - hankaku-katakana is to zenkaku-katakana
    - zenkaku-eisu is to hankaku-eisu
    """
    if input_text in STRING_EXCEPTION:
        return input_text
    else:
        return jaconv.z2h(input_text, kana=False, ascii=True, digit=True)