How to use the jaconv.h2z 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 normalize_text_normal_ipadic(input_text, kana=True, ascii=True, digit=True):
    # type: (text_type,bool,bool,bool)->text_type
    """
    * All hankaku Katanaka is converted into Zenkaku Katakana
    * All hankaku English alphabet and numberc string are converted into Zenkaku one
    """
    return jaconv.h2z(input_text, kana=kana, ascii=ascii, digit=digit)
github marcan / blitzloop / blitzloop / web.py View on Github external
def normalize(s):
    val = jaconv.h2z(s)
    val = jaconv.hira2kata(val)
    val = val.translate(normalize_tbl)
    return val