Skip to content

Commit

Permalink
feat(lang): 桂陽、樟樹、黨項
Browse files Browse the repository at this point in the history
  • Loading branch information
osfans committed Dec 26, 2024
1 parent 2aa0131 commit 7bedcba
Show file tree
Hide file tree
Showing 36 changed files with 29,520 additions and 22,601 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
- name: Build with Gradle
run: ./gradlew build

- name: Create Nightly release
- name: Create latest release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: nightly
automatic_release_tag: latest
prerelease: true
title: "Nightly Build"
title: "Lastest Build"
files: |
app/build/outputs/apk/release/*.APK
tools/warnings.txt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
本程序源自[漢字古今中外讀音查詢](https://github.com/MaigoAkisame/MCPDict),現收錄了[數百種語言(方言)](https://geojson.io/#id=github:osfans/MCPDict/blob/master/%E6%96%B9%E8%A8%80.geojson&map=3.02/37.65/108.48)的漢字讀音,使用國際音標注音,可查詢漢字在古今中外多種語言中的讀音及釋義,也能給語言學習者提供有限的幫助。可去[QQ群](mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D-hNzAQCgZQL-uIlhFrxWJ56umCexsmBi)[GitHub](https://github.com/osfans/MCPDict)提出意見与建議,提供同音字表請求收錄。

本程序最開始僅有安卓離綫版,後來又開發了在綫網頁版,另外[nk2028](https://github.com/nk2028)[唯二](https://github.com/vearvip)也各自開發了網頁版:
- [最新安卓版](https://github.com/osfans/MCPDict/releases/tag/nightly):使用[Github Actions](https://github.com/osfans/MCPDict/actions)自動編譯[代碼](https://github.com/osfans/MCPDict)生成的安卓版、[錯誤日志](https://mcpdict.sourceforge.io/warnings.txt)
- [最新安卓版](https://github.com/osfans/MCPDict/releases/tag/latest):使用[Github Actions](https://github.com/osfans/MCPDict/actions)自動編譯[代碼](https://github.com/osfans/MCPDict)生成的安卓版、[錯誤日志](https://mcpdict.sourceforge.io/warnings.txt)
- [最新網頁版](https://mcpdict.sourceforge.io/)[前端](https://github.com/osfans/MCPDict/tree/master/cgi/cgi-bin)):提供了與安卓版界面類似的一部分功能。
- [唯二網頁版](https://mcpdict.vear.vip/)[前端](https://github.com/vearvip/mcpdict-frontend)[後端](https://github.com/vearvip/mcpdict-backend)):提供了字音查詢、長文注音、語言地圖、設置等功能。
- [nk2028網頁版](https://nk2028.shn.hk/hdqt/)[前端](https://github.com/nk2028/hdqt)[後端](https://github.com/nk2028/hdqt-server)):提供了字音查詢等功能。
Expand Down
4 changes: 2 additions & 2 deletions tools/tables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ def getLangs(dicts, argv, 省=None):
print(f"{lang} 字數太少: {lang.count}")
elif lang.syCount < 100:
print(f"{lang} 音節太少: {lang.syCount}")
# if not len(toneMaps.keys()):
# lang.errors.append("無調值")
if not d["無調"] and not toneMaps:
print(f"{lang} 無調值")
lang.info["文件名"] = lang._file
if d["省"]:
[d["省"]] += 1
Expand Down
2 changes: 2 additions & 0 deletions tools/tables/_縣志.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ def format(self, line):
if line.startswith("#"): return line
line = re.sub(r"([?#\-\+])(.)", "\\2\\1", line)
line = line.replace("-", "(舊)").replace("+", "/").replace("?", "?").replace("#", "*")
elif name in ("黨項",):
line = re.sub(r"(.\{)", "[0]\\1", line)
return line

def parseYm(self, line):
Expand Down
2 changes: 2 additions & 0 deletions tools/tables/_表.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ def normYb(self, yb):
yb = yb.replace("[", "").replace("]", "")
yb = re.sub(r"^([mnvʋɹl])(\d+)$", "\\1\u0329\\2", yb)
yb = re.sub(r"^([ŋȵʐɱɻʒ])(\d+)$", "\\1\u030D\\2", yb)
if self.info["無調"]:
yb = yb.rstrip("0123456789")
return yb

def checkYb(self, yb):
Expand Down
2 changes: 2 additions & 0 deletions tools/tables/_詳情.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def load(省):
跳過行數 = int(fs["跳過行數"]) if fs["跳過行數"] else 0
地圖級別 = fs["地圖級別"].count("★") if fs["地圖級別"] else 0

無調 = fs["無調"] == "☑"
j = fields.index("[1]陰平")
聲調 = getTones([fs[fields[i]] for i in range(j, j+10)])

Expand Down Expand Up @@ -203,6 +204,7 @@ def load(省):
"音系":音系,
"說明":說明,
"繁簡":繁簡,
"無調":無調,
"聲調":聲調
}
if 聯表列名:
Expand Down
107 changes: 107 additions & 0 deletions tools/tables/data/党项.tsv

Large diffs are not rendered by default.

Loading

0 comments on commit 7bedcba

Please sign in to comment.