Skip to content

Commit

Permalink
Merge pull request #589 from i3thuan5/TL行為kah別的羅馬字愛仝款
Browse files Browse the repository at this point in the history
臺羅行為kah別的羅馬字仝款,莫處理mo=>moo
  • Loading branch information
sih4sing5hong5 committed Aug 5, 2018
2 parents 7f8ab6f + 3f73bab commit 1224ff0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def 分析聲韻調(self, 音標):
if self. in ['m', 'n', 'ng']:
if self. not in ['ng', 'ngh'] and ('n' in self. or 'm' in self.):
音標是著的 = False
if self.[-1] in ['p', 't', 'k']:
elif self.[-1] in ['p', 't', 'k']:
音標是著的 = False
elif self. == 'o':
音標是著的 = False
if self. in ['b', 'l', 'g']:
if 'nn' in self.:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ def __init__(self, 音標):
.replace('ou', 'oo')
.replace('ooN', 'onn').replace('oonn', 'onn')
)
if self. == 'm' or self. == 'n' or self. == 'ng':
if self. == 'o':
self.音標 = None

def 轉換到臺灣閩南語羅馬字拼音(self):
if self.音標 is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ class 臺灣閩南語羅馬字拼音(教會系羅馬音標):
def __init__(self, 音標):
super(臺灣閩南語羅馬字拼音, self).__init__()
self.分析聲韻調(音標)
if self. == 'm' or self. == 'n' or self. == 'ng':
if self. == 'o':
self. = 'oo'
self.做音標()
if self.調 not in self.對通用調對照表:
self.調 = None
self.音標 = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ def __init__(self, 音標):
.replace('ou', 'oo')
.replace('ooN', 'onn').replace('oonn', 'onn')
)
if self. == 'm' or self. == 'n' or self. == 'ng':
if self. == 'o':
self.音標 = None

def 轉換到臺灣閩南語羅馬字拼音(self):
if self.音標 is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def test_輸入閏號音標(self):
self.assertEqual(臺灣閩南語羅馬字拼音('tsňg').音標, 'tsng6')
self.assertEqual(臺灣閩南語羅馬字拼音('pňg').音標, 'png6')

def test_鼻化ㆦ(self):
self.assertEqual(臺灣閩南語羅馬字拼音('mo5').音標, 'moo5')
self.assertEqual(臺灣閩南語羅馬字拼音('ngoo5').音標, 'ngoo5')
def test_鼻化ㆦ愛oo(self):
self.assertIsNone(臺灣閩南語羅馬字拼音('ngo').音標)

def test_次方言音標(self):
self.assertEqual(臺灣閩南語羅馬字拼音('tor').音標, 'tor1')
Expand Down

0 comments on commit 1224ff0

Please sign in to comment.