A Python library for dealing with Hokchew data.
This library is currently pre-alpha. Things can change without notice.
- Python 3.6
pip install git+https://github.com/MindongLab/PyHokchew
>>>frompyhokchew.parserimportparse_foochow_romanizedasparse>>>p=parse('cṳ̄ng')
>>>p.get_initial()
'c'>>>p.get_tone()
2>>>p.get_final_without_tone()
'ṳng'>>>p.get_final_with_tone()
'ṳ̄ng'>>>frompyhokchew.convertimportciklin_to_foochow_romanized_stringasconvert>>>convert('柳','雞','下上')
'liē'>>>convert('柳','雞','下去')
'liê'>>>convert('鶯','初','下去')
'âe̤'>>>convert('鶯','初','下平')
'è̤'>>>frompyhokchew.models.yngping.YngPingTwoimportYngPingSyllable>>>YngPingSyllable.from_string('doeyng55').to_handwritten()
'dëüng'
piphere refers to PIP 3+
git clone https://github.com/MindongLab/PyHokchew.git
cd PyHokchew
pip install -e .python -m unittest discover -v ."*Test.py"