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
>>> from pyhokchew.parser import parse_foochow_romanized as parse
>>> p = parse('cṳ̄ng')
>>> p.get_initial()
'c'
>>> p.get_tone()
2
>>> p.get_final_without_tone()
'ṳng'
>>> p.get_final_with_tone()
'ṳ̄ng'
>>> from pyhokchew.convert import ciklin_to_foochow_romanized_string as convert
>>> convert('柳','雞','下上')
'liē'
>>> convert('柳','雞','下去')
'liê'
>>> convert('鶯','初','下去')
'âe̤'
>>> convert('鶯','初','下平')
'è̤'
>>> from pyhokchew.models.yngping.YngPingTwo import YngPingSyllable
>>> YngPingSyllable.from_string('doeyng55').to_handwritten()
'dëüng'
pip
here refers to PIP 3+
git clone https://github.com/MindongLab/PyHokchew.git
cd PyHokchew
pip install -e .
python -m unittest discover -v . "*Test.py"