Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
/ PyHokchew Public archive

A Python library for dealing with Hokchew data. 福州話 Python 搞。

License

Notifications You must be signed in to change notification settings

MindongLab/PyHokchew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyHokchew

A Python library for dealing with Hokchew data.

This library is currently pre-alpha. Things can change without notice.

Prerequisite

  • Python 3.6

Example usage

Installation

pip install git+https://github.com/MindongLab/PyHokchew

Parse Foochow Romanized

>>> 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'

Convert Qi Lin Ba Yin (戚林八音) Fanqie to Foochow Romanized

>>> 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'

Developing

Install from source

pip here refers to PIP 3+

git clone https://github.com/MindongLab/PyHokchew.git
cd PyHokchew
pip install -e .

Running unit tests

python -m unittest discover -v . "*Test.py"

About

A Python library for dealing with Hokchew data. 福州話 Python 搞。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages