Skip to content

alvations/yubin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yubin

Converts Japanese address in raw string to structured object.

Install

pip install -U yubin

Usage

>>> from yubin import Postman
>>> pm = Postman()

# Returns structured object.
>>> pm.tokenize('〒158-0094東京都世田谷区玉川一丁目14番1号')
Address(to=['東京都'], kai=[], ku=['世田谷区'], mune=[], chome=['一丁目'], ban=['14番'], go=['1号'], postal=['〒158-0094'], endgo=[],
        tokens=['〒158-0094', '東京都', '世田谷区', '玉川', '一丁目', '14番', '1号'])

# Return tokenized string, split by space.
>>> pm.tokenize('〒158-0094東京都世田谷区玉川一丁目14番1号', return_str=True)
'〒158-0094 東京都 世田谷区 玉川 一丁目 14番 1号'

Releases

No releases published

Packages

No packages published

Languages