Skip to main content

THOKIT / 桃橘

「桃橘」(THOKIT,Tong-uán Hokkien Orthography toolKIT)是東苑實驗室个閩南方言拼寫方案處理工具套件。

「桃橘」漢字號名取漳州話 Thô-kit,毋過若讀做泉廈腔 Thô-kiat 嘛解使着。

支持个編程語言

  • Python
  • JavaScript

主要功能

  • 臺羅/白話字个數字式(ASCII)/閏符式(Unicode)互轉
  • 臺羅數字式/白話字數字式互轉
  • 臺羅閏符式/白話字閏符式互轉
  • 支持全大寫處理
  • 支持加種白話字標準
  • 支持自定義羅馬字調符

開始

Python

from thokit import ThoKit
thokit = ThoKit()

print(thokit.tailoAscii2Unicode('Sann1 TE2 khoo3 khuah4; lang5 lau6 phinn7 tit8. Hann9?'))
print(thokit.pojAscii2Unicode('SANN te2 khoo3 khuah; lang5 lau6 phinn7 tit8. Hann9?'))

HTML

<script type="module">
  import { ThoKit } from '../../thokit.js';
  const thokit = new ThoKit();
  console.log(thokit.tailoAscii2Unicode('Sann1 TE2 khoo3 khuah4; lang5 lau6 phinn7 tit8. Hann9?'))
  console.log(thokit.pojAscii2Unicode('SANN te2 khoo3 khuah; lang5 lau6 phinn7 tit8. Hann9?'))
</script>

Node.js

npm install
npm run build
const { ThoKit } = require('./dist/thokit.cjs');
const thokit = new ThoKit();

console.log(thokit.tailoAscii2Unicode('Sann1 TE2 khoo3 khuah4; lang5 lau6 phinn7 tit8. Hann9?'))
console.log(thokit.pojAscii2Unicode('SANN te2 khoo3 khuah; lang5 lau6 phinn7 tit8. Hann9?'))

Python

python test/py/oj.py

HTML

試用 test/html/demo.html(着注意 thokit.js 个導入),或者「韻彙」網站搭个頁面。

Node.js

node test/node/oj.cjs

白話字標準說明

THOKIT 今支持下底即幾若款白話字標準,字母佮標調規則小可有縒。

默認標準

大致照信望愛台語客語輸入法(FHL Taigi-Hakka IME)白話字个拼寫方式。

TL => default POJ

  • ts/tsh => ch/chh
  • ua/ue => oa/oe
  • ing/ik => eng/ek
  • nn => ⁿ
  • NN(nn 个大寫) => ᴺ
  • oo => o͘
  • nnh => ⁿh
  • a̋ (a9) => ă
  • iu/ui:標 u
  • oa/oe:頭前接聲母,後壁無接元音或者塞音韻尾,標 o;若無標 a/e
    • ⚠️ uā, uē, uānn => oā, oē, oāⁿ
    • tuā, tuē, tuānn => tōa, tōe, tōaⁿ
    • ua̍h, hua̍h, uāi, uān,huāi, huān => oa̍h, hoa̍h, oāi, oān, hoāi, hoān
    • ue̍h, gue̍h, ngue̍h => oe̍h, goe̍h

佮信望愛輸入法个主要差異:

  • auh8/aunnh8:a̍uh/a̍uⁿh
    • ta̍uh-ta̍uh-á (o)
    • tau̍h-tau̍h-á (x)
  • ere 佮 irinn (老泉腔)調符放咧央元音

甘爲霖標準(campbell)

照甘爲霖《廈門音新字典》(1913)个拼寫方式佮標調規則。

TL => Campbell POJ

  • ch/chh:
    • tsh => chh
    • ⚠️ tsa, tso, tsu => tsa, tso, tsu
    • tsi, tse => chi, che
  • ua/ue => oa/oe
  • ing/ik => eng/ek
  • nn => ⁿ
  • ⚠️ nnh => hⁿ
  • oo => o͘
  • onn => o͘ⁿ
  • moo/ngoo => mo͘/ngo͘
  • noo => no͘ⁿ
  • iu/ui:標 u
  • oa/oe:頭前接聲母,後壁無接元音或者塞音韻尾,標 o;若無標 a/e
    • ⚠️ uā, uē, uānn => oā, oē, oāⁿ
    • tuā, tuē, tuānn => tōa, tōe, tōaⁿ
    • ua̍h, hua̍h, uāi, uān,huāi, huān => oa̍h, hoa̍h, oāi, oān, hoāi, hoān
    • oe̍h, goe̍h => oe̍h, goe̍h
  • ⚠️ a̍innh => ai̍hⁿ

杜嘉德標準(douglas)

照杜嘉德《廈英大辭典》(1873)个拼寫方式佮標調規則。

TL => Douglas POJ

  • ch/chh:
    • tsh => chh
    • ⚠️ tsa, tso, tsu => tsa, tso, tsu
    • tsi, tse => chi, che
  • ua/ue => oa/oe
  • ing/ik => eng/ek
  • nn => ⁿ
  • ⚠️ nnh => hⁿ
  • oo => ɵ͘
  • onn => ɵ͘ⁿ
  • iu/ui:標 u
  • ✅ ir, er, ee => ü, ö, ɛ
  • oa/oe:oa* 標 a; oe* 標 o
    • ⚠️ uā, uē, uānn => ōa, ōe, ōaⁿ
    • tuā, tuē, tuānn => tōa, tōe, tōaⁿ
    • ua̍h, hua̍h, uāi, uān,huāi, huān => oa̍h, hoa̍h, oāi, oān, hoāi, hoān
  • ⚠️ ainn 頭前若無字母,標 i

巴克禮標準(barclay)

照巴克禮《廈英大辭典增補》(1923)个拼寫方式佮標調規則。

TL => Barclay POJ

  • ch/chh:
    • tsh => chh
    • ⚠️ tsa, tso, tsu => tsa, tso, tsu
    • tsi, tse => chi, che
  • ua/ue => oa/oe
  • ing/ik => eng/ek
  • nn => ⁿ
  • ⚠️ nnh => hⁿ
  • oo => o͘
  • onn => o͘ⁿ
  • iu/ui:標 u
  • ✅ ir, er, ee => ü, ö, ɛ
  • oa/oe:韻母 oa/oaⁿ,且非零聲母,標 o;若無(oah/oan/oat……)標 a;oe* 標 o
    • ⚠️ uā, ua̍h, uānn, tuā, tuānn => ōa, oa̍h, ōaⁿ, toā, toāⁿ
    • ⚠️ uē, tuē => ōe, o̍eh, tōe

馬約翰(麥嘉湖)標準(macgowan)

照馬約翰(麥嘉湖)《英廈辭典》(1883)个拼寫方式佮標調規則。

TL => macgowan POJ

授權協議

MIT

Metadata

Release files for thokit 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thokit 0.0.2
File Size Uploaded
thokit-0.0.2.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thokit 0.0.2
File Interpreter ABI Platform
thokit-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / thokit-0.0.2.tar.gz

Download URL thokit-0.0.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1d6c3a290e1ad80e59d2142ae0f18de0543b69d41d64bdeb9fe509ca00b9a676
BLAKE2b-256 checksum
How to use checksums
4b3691f1d65fcfba506b9e84170700c595ae33f099516704781e9d120f874dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.17

Release files / thokit-0.0.2-py3-none-any.whl

Download URL thokit-0.0.2-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b18069719b87ca5e5b0b66721943e90ddfe095e4b49ad4f82b607d278ba736dd
BLAKE2b-256 checksum
How to use checksums
30dc62cf484bc5e97c77f0cdf5f4fa27f9896d7d0ceb87f028362341eaafa163
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.17

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page