diff --git a/Ho_Lok_Ue.db b/Ho_Lok_Ue.db index 91a2c3d..a645ee6 100644 Binary files a/Ho_Lok_Ue.db and b/Ho_Lok_Ue.db differ diff --git a/Nga_Siok_Thong.sqbpro b/Nga_Siok_Thong.sqbpro deleted file mode 100644 index 355e9bc..0000000 --- a/Nga_Siok_Thong.sqbpro +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/Nga_Siok_Thong_Sip_Ngoo_Im.db b/Nga_Siok_Thong_Sip_Ngoo_Im.db deleted file mode 100644 index 2cc001c..0000000 Binary files a/Nga_Siok_Thong_Sip_Ngoo_Im.db and /dev/null differ diff --git a/Sip_Ngoo_Im.db b/Sip_Ngoo_Im.db deleted file mode 100644 index e69de29..0000000 diff --git a/Tai_Loo_Han_Ji_Khoo b/Tai_Loo_Han_Ji_Khoo deleted file mode 100644 index e69de29..0000000 diff --git a/Tai_Loo_Han_Ji_Khoo.db b/Tai_Loo_Han_Ji_Khoo.db deleted file mode 100644 index 3c173b2..0000000 Binary files a/Tai_Loo_Han_Ji_Khoo.db and /dev/null differ diff --git a/mod_Han_Ji_Piau_Tsu_Im.py b/__mod_Han_Ji_Piau_Tsu_Im.py similarity index 100% rename from mod_Han_Ji_Piau_Tsu_Im.py rename to __mod_Han_Ji_Piau_Tsu_Im.py diff --git a/mod_Query_for_Tshiat_Gu.py b/__mod_Query_for_Tshiat_Gu.py similarity index 100% rename from mod_Query_for_Tshiat_Gu.py rename to __mod_Query_for_Tshiat_Gu.py diff --git a/mod_huan_tshiat.py b/__mod_huan_tshiat.py similarity index 100% rename from mod_huan_tshiat.py rename to __mod_huan_tshiat.py diff --git a/mod_huan_tshiat_test.py b/__mod_huan_tshiat_test.py similarity index 90% rename from mod_huan_tshiat_test.py rename to __mod_huan_tshiat_test.py index 03270ac..15edeb2 100644 --- a/mod_huan_tshiat_test.py +++ b/__mod_huan_tshiat_test.py @@ -1,6 +1,6 @@ # mod_huan_tshiat_test.py 內容 -from mod_huan_tshiat import siong_ji_tsa_siann_bu, ha_ji_tsa_un_bu +from __mod_huan_tshiat import ha_ji_tsa_un_bu, siong_ji_tsa_siann_bu # 測試 siong_ji_tsa_siann_bu 函數 siong_ji = "普" diff --git "a/mod_\351\233\205\344\277\227\351\200\232.py" "b/__mod_\351\233\205\344\277\227\351\200\232.py" similarity index 100% rename from "mod_\351\233\205\344\277\227\351\200\232.py" rename to "__mod_\351\233\205\344\277\227\351\200\232.py" diff --git "a/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_Excel.py" "b/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_Excel.py" index 1ac5b1c..562554f 100644 --- "a/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_Excel.py" +++ "b/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_Excel.py" @@ -1,17 +1,18 @@ #============================================================================== # 透過 Excel ,使用廣韻的反切方法,查找漢字的羅馬拼音。 -# +# # 操作方式: # - 輸入欲查詢羅馬拼音之漢字; # - 輸入廣韻的查找索引資料。 -# +# # ipython a900_廣韻反切查羅馬拼音.ipynb 攝 "書涉 (《廣韻·入聲·葉·攝》)" #============================================================================== import sys + import xlwings as xw -from mod_huan_tshiat import tshu_tiau +from __mod_huan_tshiat import tshu_tiau from mod_於字典網站查詢漢字之廣韻切語發音 import fetch_kong_un_info @@ -54,7 +55,7 @@ def fetch_arg(): ## 開啟可執行反切查羅馬拼音之活頁簿檔案 # 1. 開啟 Excel 活頁簿檔案: .\tools\廣韻反切查音工具.xlsx ; # 2. 擇用 "反切" 工作表。 - # + # # [程式規格]: # - 使用 xlwings 套件,操作 Excel 檔案; # - 以上兩步的作業程序,都用 try: exception: 形式執行,遇有意外事件發生時,於畫面顯示問題狀況,然後終止程式的繼續執行。 @@ -62,28 +63,28 @@ def fetch_arg(): try: # 指定 Excel 檔案路徑 file_path = r'.\\tools\\廣韻反切查音工具.xlsx' - + # 使用 xlwings 開啟 Excel 檔案 wb = xw.Book(file_path) - + # 選擇名為 "反切" 的工作表 sheet = wb.sheets['反切'] - + # 將變數值填入指定的儲存格 sheet.range('C2').value = han_ji for item in tshiat_gu_list: - # 將漢字之切語填入指定的儲存格 + # 將漢字之切語填入指定的儲存格 sheet.range('D2').value = item["tshiat_gu"] # 將切語上字填入指定的儲存格 sheet.range('C5').value = siong_ji = item["tshiat_gu"][0] # 將切語下字填入指定的儲存格 sheet.range('C6').value = ha_ji = item["tshiat_gu"][1] - # 將切語下字所屬之四聲調類填入指定的儲存格 - sheet.range('E6').value = tshu_tiau(item["tiau"]) - + # 將切語下字所屬之四聲調類填入指定的儲存格 + sheet.range('E6').value = tshu_tiau(item["tiau"]) + # 從 D8 儲存格取出值,存放於變數 tai_lo_phing_im tai_lo_phing_im = sheet.range('D8').value - + #======================================================= # 顯示查詢結果 #======================================================= diff --git "a/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_SQLite.py" "b/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_SQLite.py" index 1ab41c3..d3d2f4b 100644 --- "a/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_SQLite.py" +++ "b/a600_\346\274\242\345\255\227\346\237\245\345\273\243\351\237\273\346\223\254\351\237\263_SQLite.py" @@ -1,17 +1,17 @@ #============================================================================== # 透過 Excel ,使用廣韻的反切方法,查找漢字的羅馬拼音。 -# +# # 操作方式: # - 輸入欲查詢羅馬拼音之漢字; # - 輸入廣韻的查找索引資料。 -# +# # ipython a900_廣韻反切查羅馬拼音.ipynb 攝 "書涉 (《廣韻·入聲·葉·攝》)" #============================================================================== import sys -from mod_huan_tshiat import query_tiau_ho, tshu_tiau -from mod_Query_for_Tshiat_Gu import query_tshiat_gu_ha_ji, query_tshiat_gu_siong_ji +from __mod_huan_tshiat import query_tiau_ho, tshu_tiau +from __mod_Query_for_Tshiat_Gu import query_tshiat_gu_ha_ji, query_tshiat_gu_siong_ji from mod_於字典網站查詢漢字之廣韻切語發音 import fetch_kong_un_info @@ -86,7 +86,7 @@ def fetch_arg(): # 組合台羅拼音 tai_lo_phing_im = f"{tai_lo_siann_bu}{tai_lo_un_bu}{tiau_ho}" - + #======================================================= # 顯示查詢結果 #======================================================= diff --git "a/mod_\346\262\263\346\264\233\350\251\261.py" "b/mod_\346\262\263\346\264\233\350\251\261.py" index 0767d1a..9b54b04 100644 --- "a/mod_\346\262\263\346\264\233\350\251\261.py" +++ "b/mod_\346\262\263\346\264\233\350\251\261.py" @@ -46,7 +46,7 @@ def han_ji_ca_piau_im(cursor, han_ji, reading_type="文讀音"): 常用度, 摘要說明 FROM - 台羅音標漢字庫 + 漢字庫 WHERE 漢字 = ? AND ({reading_condition}) ORDER BY @@ -66,7 +66,7 @@ def han_ji_ca_piau_im(cursor, han_ji, reading_type="文讀音"): 常用度, 摘要說明 FROM - 台羅音標漢字庫 + 漢字庫 WHERE 漢字 = ? ORDER BY diff --git "a/output5/\343\200\220\346\262\263\346\264\233\350\251\261\346\263\250\351\237\263\343\200\221\343\200\212\346\255\243\346\260\243\346\255\214\343\200\213\343\200\220\346\262\263\346\264\233\347\231\275\350\251\261\351\237\263\343\200\221.xlsx" "b/output5/\343\200\220\346\262\263\346\264\233\350\251\261\346\263\250\351\237\263\343\200\221\343\200\212\346\255\243\346\260\243\346\255\214\343\200\213\343\200\220\346\262\263\346\264\233\347\231\275\350\251\261\351\237\263\343\200\221.xlsx" index 4ffb10c..2de9cfa 100644 Binary files "a/output5/\343\200\220\346\262\263\346\264\233\350\251\261\346\263\250\351\237\263\343\200\221\343\200\212\346\255\243\346\260\243\346\255\214\343\200\213\343\200\220\346\262\263\346\264\233\347\231\275\350\251\261\351\237\263\343\200\221.xlsx" and "b/output5/\343\200\220\346\262\263\346\264\233\350\251\261\346\263\250\351\237\263\343\200\221\343\200\212\346\255\243\346\260\243\346\255\214\343\200\213\343\200\220\346\262\263\346\264\233\347\231\275\350\251\261\351\237\263\343\200\221.xlsx" differ diff --git "a/test_mod_\351\233\205\344\277\227\351\200\232.py" "b/test_mod_\351\233\205\344\277\227\351\200\232.py" index 9dd202c..67a3b21 100644 --- "a/test_mod_\351\233\205\344\277\227\351\200\232.py" +++ "b/test_mod_\351\233\205\344\277\227\351\200\232.py" @@ -2,22 +2,22 @@ import sqlite3 import unittest -from mod_雅俗通 import han_ji_cha_piau_im, split_cu_im # 假設你將函數保存在 'your_module.py' 中 +from __mod_雅俗通 import han_ji_cha_piau_im, split_cu_im # 假設你將函數保存在 'your_module.py' 中 class TestHanJiChaPiauIm(unittest.TestCase): - + @classmethod def setUpClass(cls): # 在所有測試開始前,連接資料庫 cls.conn = sqlite3.connect('Nga_Siok_Thong_Sip_Ngoo_Im.db') # 替換為實際資料庫路徑 cls.cursor = cls.conn.cursor() - + @classmethod def tearDownClass(cls): # 在所有測試結束後,關閉資料庫連接 cls.conn.close() - + def test_han_ji_cha_piau_im(self): # 測試漢字查詢功能 han_ji = '不' diff --git a/working.xlsx b/working.xlsx deleted file mode 100644 index e6d7882..0000000 Binary files a/working.xlsx and /dev/null differ