Skip to content

Commit

Permalink
Merge pull request #665 from i3thuan5/POJ-Te9Tiau
Browse files Browse the repository at this point in the history
POJ-Te 9 Tiau
  • Loading branch information
sih4sing5hong5 committed Oct 25, 2019
2 parents 988e122 + 0cbdf3e commit 5a91962
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@


def 取得白話字韻母調符對照表():
結果 = {}
結果 = {
('a', '9'): 'ă', ('e', '9'): 'ĕ', ('i', '9'): 'ĭ',
('o', '9'): 'ŏ', ('o͘', '9'): 'ŏ͘', ('u', '9'): 'ŭ',
('m', '9'): 'm̆', ('n', '9'): 'n̆',
}
for 白話字傳統調, 臺羅組 in 教會系羅馬音標聲調符號表.items():
if 白話字傳統調 == 'ı̍':
# i8有兩種unicode,踢掉跟教典不同的。
Expand All @@ -13,7 +17,8 @@ def 取得白話字韻母調符對照表():
新鍵值 = 臺羅組
if 臺羅 == 'oo':
新鍵值 = ('o͘', 數字調)
結果.update({新鍵值: 白話字傳統調})
if 數字調 != '9':
結果.update({新鍵值: 白話字傳統調})
return 結果


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,15 @@ def test_韻對照表(self):
# # 符號予別的工具處理
# self.assertEqual(臺灣閩南語羅馬字拼音('0tir5').轉白話字(), '0tîr')
# self.assertEqual(臺灣閩南語羅馬字拼音('1tir5').轉白話字(), '1tîr')

def test_第9調_TL分POJ分(self):
# kan-na取代分離的調號,e m n
self.assertEqual(臺灣閩南語羅馬字拼音('m̋').轉白話字(), 'm̆')

def test_第9調_TL分POJ組(self):
# a i
self.assertEqual(臺灣閩南語羅馬字拼音('a̋').轉白話字(), 'ă')

def test_第9調_TL組POJ分(self):
# o
self.assertEqual(臺灣閩南語羅馬字拼音('őo').轉白話字(), 'ŏ͘')

0 comments on commit 5a91962

Please sign in to comment.