jamorasep.kana_util
Module Contents
Functions
|
Convert hiragana to katakana. |
|
Convert katakana to hiragana. |
|
Check if the input is hiragana. |
|
Check if the input is katakana. |
|
Check if the input is hiragana or katakana. |
- jamorasep.kana_util.h2k(text: str = '')
Convert hiragana to katakana. Characters other than hiragana are not converted. Only Unicode is supported, which is the default code in Python3.
- Parameters:
text (str) – hiragana string
- Returns:
katakana string
- Return type:
str
- jamorasep.kana_util.k2h(text: str = '')
Convert katakana to hiragana. Characters other than katakana are not converted. Only Unicode is supported, which is the default code in Python3. Hankaku katakana will not be converted. Some special katakana such as ヸ will not be converted, too.
- Parameters:
text (str) – katakana string
- Returns:
hiragana string
- Return type:
str
- jamorasep.kana_util.is_hiragana(text: str | List[str] = '')
Check if the input is hiragana. Only Unicode is supported, which is the default code in Python3.
- Parameters:
text (str) – string
- Returns:
True if the input is hiragana.
- Return type:
bool
- jamorasep.kana_util.is_katakana(text: str | List[str] = '')
Check if the input is katakana. Only Unicode is supported, which is the default code in Python3.
- Parameters:
text (str) – string
- Returns:
True if the input is katakana.
- Return type:
bool
- jamorasep.kana_util.is_kana(text: str | List[str] = '')
Check if the input is hiragana or katakana. Only Unicode is supported, which is the default code in Python3.
- Parameters:
text (str) – string
- Returns:
True if the input is hiragana or katakana.
- Return type:
bool