chartype

Identify character types such as hiragaa, katakana and so on
Download

chartype Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Noriyuki ABE

chartype Tags


chartype Description

chartype is a Python module to identify the Unicode String types such as Hiragana, Katakana, Kannji and so on.UsageIdentify wheter the string is Hiragana or not.>>> ch = Chartype()>>> ch.is_hiragana(u'あ')True>>> ch.is_hiragana(u'ア')FalseIdentify wheter the string is Katakana or not.>>> ch = Chartype()>>> ch.is_katakana(u'ア')True>>> ch.is_katakana(u'あ')FalseIdentiry wheter the string is Harf Katakana or not.>>> ch = Chartype()>>> ch.is_halfwidthkatakana(u'ア')True>>> ch.is_halfwidthkatakana(u'ア')FalseIdentiry wheter the string is Kanji or not.>>> ch = Chartype()>>> ch.is_kanji(u'漢')True>>> ch.is_kanji(u'か')FalseIdentiry wheter the string is * or not.>>> ch = Chartype()>>> ch.is_latinsmall(u'a')True>>> ch.is_latinsmall(u'あ')FalseIdentiry wheter the string is * or not.>>> ch = Chartype()>>> ch.is_latincapital(u'A')True>>> ch.is_latincapital(u'a')FalseIdentiry wheter the string is numeric or not.>>> ch = Chartype()>>> ch.is_digit(u'1')True>>> ch.is_digit(u'a')FalseIdentiry wheter the string is or not.>>> ch = Chartype()>>> ch.is_kuten(u'。')True>>> ch.is_kuten(u'.')TrueIdentiry wheter the string is or not.>>> ch = Chartype()>>> ch.is_touten(u'、')True>>> ch.is_touten(u',')TrueIdentiry wheter the string is Latin Character or not.>>> ch = Chartype()>>> ch.is_latin(u'a')True>>> ch.is_latin(u'A')True>>> ch.is_latin(u'1')FalseIdentiry wheter the string is Ascii Character or not.>>> ch = Chartype()>>> ch.is_ascii(u'a')True>>> ch.is_ascii(u'A')True>>> ch.is_ascii(u'1')TrueIdentiry wheter the string is or not.>>> ch = Chartype()>>> ch.is_kutouten(u'。')True>>> ch.is_kutouten(u'.')True>>> ch.is_kutouten(u'、')True>>> ch.is_kutouten(u',')TrueIdentiry wheter the string is Japanese or not.>>> ch = Chartype()>>> ch.is_nihongo(u'あ')True>>> ch.is_nihongo(u'a')FalseCharacters which is not True in the above function.>>> ch = Chartype()>>> ch.otherwise(u'!')True>>> ch.otherwise(u'!')TrueDecide whether two characters are same types or not.>>> ch = Chartype()>>> ch.is_sametype(u'あ', u'あ')True>>> ch.is_sametype(u'あ', u'a')FalseProduct's homepage


chartype Related Software