Easy converter between Kanji-Number and Integer
Powered by Yamato Nagata
GitHub
Can Convert Number up to 10 ** 72 - 1
from kanjize import number2kanji, kanji2number, Number, KanjizeConfiguration, KanjizeZero, KanjizeStyle
print(number2kanji(58076099))
print(number2kanji(58076099, config=KanjizeConfiguration(use_daiji=True)))
print(kanji2number("五千八百七万六千九十九"))
print(kanji2number("223兆4千億4256万6千"))
print(kanji2number("223兆4000億4256万6000"))
print(number2kanji(223400042566000, config=KanjizeConfiguration(style=KanjizeStyle.MIXED, kanji_thousand=False)))
print(number2kanji(223400042566000, config=KanjizeConfiguration(style=KanjizeStyle.MIXED)))
print(number2kanji(20301, config=KanjizeConfiguration(style=KanjizeStyle.FLAT)))
print(number2kanji(20301, config=KanjizeConfiguration(style=KanjizeStyle.FLAT, zero=KanjizeZero.KANJI)))
print(number2kanji(0))
print(number2kanji(0, config=KanjizeConfiguration(zero=KanjizeZero.SIGN)))
print((Number.from_kanji("223兆4千億4256万6千") * Number(2.3)).to_kanji(config=KanjizeConfiguration(style=KanjizeStyle.MIXED)))