-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
242 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# -*- coding: utf-8 -*- | ||
from unittest.case import TestCase, skip | ||
from 臺灣言語工具.解析整理.拆文分析器 import 拆文分析器 | ||
|
||
|
||
class 物件轉字串整合試驗(TestCase): | ||
# 原本字串生按怎就照伊原本--的顯示 | ||
|
||
def tearDown(self): | ||
物件 = 拆文分析器.建立句物件(self.語句) | ||
self.assertEqual(物件.看語句(), self.語句) | ||
|
||
def test_全羅(self): | ||
self.語句 = 'Lia̍h suí-ti' | ||
|
||
def test_全羅句頭輕聲詞(self): | ||
self.語句 = 'Ah' | ||
|
||
def test_全羅句頭輕聲(self): | ||
self.語句 = '--Ah' | ||
|
||
def test_全羅句頭無大寫輕聲(self): | ||
self.語句 = '--ah' | ||
|
||
def test_全羅濟字輕聲(self): | ||
self.語句 = 'Kín--tshut-lâi' | ||
|
||
def test_全羅輕聲後壁接詞(self): | ||
self.語句 = 'Kín--tshut-lâi lia̍h' | ||
|
||
def test_全羅輕聲前有空白(self): | ||
self.語句 = 'Kín --tshut-lâi' | ||
|
||
def test_全羅連續輕聲(self): | ||
self.語句 = 'Kín --tshut-lâi --lah' | ||
|
||
def test_全羅粗坯的輕聲(self): | ||
self.語句 = 'Kin2-0tshut-lai5-0ah' | ||
|
||
def test_全漢(self): | ||
self.語句 = '欲 掠豬' | ||
|
||
def test_全漢無空白(self): | ||
self.語句 = '欲掠豬' | ||
|
||
def test_全漢輕聲(self): | ||
self.語句 = '--啊' | ||
|
||
@skip('分析器閣有問題') | ||
def test_全漢濟字輕聲(self): | ||
self.語句 = '緊--出-來' | ||
|
||
@skip('分析器閣有問題') | ||
def test_全漢連續輕聲(self): | ||
self.語句 = '緊--出-來--啦' | ||
|
||
@skip('分析器閣有問題') | ||
def test_漢字濟字輕聲混合201802p13(self): | ||
# = 緊--出-來,好--無 | ||
self.語句 = '想--起-來就ê驚' | ||
|
||
@skip('分析器閣有問題') | ||
def test_漢字濟字輕聲混合201802p13無空白(self): | ||
# = 緊--出-來,好--無 | ||
self.語句 = '想--起-來就 ê 驚' | ||
|
||
@skip('分析器閣有問題') | ||
def test_bongpo_201804p25(self): | ||
self.語句 = '調--來ê兵仔' | ||
|
||
@skip('分析器閣有問題') | ||
def test_bongpo_201804p25無空白(self): | ||
self.語句 = '調--來 ê 兵仔' | ||
|
||
def test_漢羅(self): | ||
self.語句 = '欲 lia̍h-ti' | ||
|
||
def test_漢羅無空白(self): | ||
self.語句 = '欲lia̍h-ti' | ||
|
||
def test_漢羅無空白無連字符(self): | ||
self.語句 = '欲lia̍h豬' | ||
|
||
def test_半形標點符號(self): | ||
self.語句 = 'ti!' | ||
|
||
def test_全形標點符號(self): | ||
self.語句 = 'ti!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from unittest.case import TestCase | ||
from 臺灣言語工具.解析整理.拆文分析器 import 拆文分析器 | ||
from 臺灣言語工具.音標系統.閩南語.臺灣閩南語羅馬字拼音 import 臺灣閩南語羅馬字拼音 | ||
|
||
|
||
class 字串物件轉音一致整合試驗(TestCase): | ||
|
||
def tearDown(self): | ||
物件 = 拆文分析器.建立句物件(self.語句).轉音(臺灣閩南語羅馬字拼音) | ||
self.assertEqual(物件.看語句(), self.答案) | ||
|
||
def test_羅馬字(self): | ||
self.語句 = 'kin2--tshut4-lai5' | ||
self.答案 = 'Kín--tshut-lâi' | ||
|
||
def test_大寫羅馬字(self): | ||
self.語句 = 'Kin2--tshut4-lai5' | ||
self.答案 = 'Kín--tshut-lâi' |
Oops, something went wrong.