-
Notifications
You must be signed in to change notification settings - Fork 296
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
5 changed files
with
30 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
# Maintainer: ZeekoZhu <[email protected]> | ||
|
||
pkgbase=rime-lmdg | ||
pkgname=("${pkgbase}-config") | ||
pkgver=3n2 | ||
pkgname=("${pkgbase}" | ||
"${pkgbase}-config") | ||
_release_tag=LTS | ||
pkgver=lts | ||
pkgrel=1 | ||
pkgdesc='RIME-LMDG万象语言模型,基于32GB超大规模语料的RIME中文语言模型' | ||
epoch=1 | ||
pkgdesc='万象语言模型,基于32GB超大规模语料的RIME中文语言模型' | ||
arch=(any) | ||
url="https://github.com/amzxyz/RIME-LMDG" | ||
source=("lmdg.yaml") | ||
source=("lmdg.yaml" | ||
"wanxiang-zh-hans.gram::${url}/releases/download/${_release_tag}/wanxiang-lts-zh-hans.gram") | ||
license=('CC-BY-4.0') | ||
sha256sums=('3248db66344b91bc175da4306cb27926abff4aad74b59a8ea20ad85ed6676e10' | ||
'f50506698265ea5fab415752dbab5d3f0f87815f9d7860a8f044a926348a845f') | ||
optdepends=('librime: Rime Input Method Engine') | ||
sha256sums=('93b605fd11281ae248eed0648629ee23312fc56edd0911aa855bdee7b0c294c4' | ||
'b8a755d7fdc568a275d2457019cc56086d69138e9f415352976664a8bc835b55') | ||
|
||
_variants=(m1) | ||
for _variant in "${_variants[@]}"; do | ||
pkgname+=("${pkgbase}-${_variant}") | ||
|
||
source+=("https://github.com/amzxyz/RIME-LMDG/releases/download/v${pkgver}/amz-v${pkgver}${_variant}-zh-hans.gram") | ||
|
||
eval 'package_rime-lmdg-'"${_variant}"'() { | ||
provides=("'${pkgbase}=${pkgver}'") | ||
pkgdesc="RIME-LMDG万象语言模型(3-gram/'"${_variants#m}"'00M)" | ||
optdepends+=("'${pkgbase}'-config: default patch configurations") | ||
install -Dm664 "${srcdir}"/*'"${_variant}"'-zh-hans.gram -t "${pkgdir}"/usr/share/rime-data/ | ||
}' | ||
done | ||
package_rime-lmdg() { | ||
provides=("${pkgbase}=${pkgver}") | ||
replaces=('rime-lmdg-m1') | ||
optdepends=('librime: Rime Input Method Engine' | ||
"${pkgbase}-config: default patch configurations") | ||
install -Dm664 "${srcdir}"/wanxiang-zh-hans.gram -t "${pkgdir}"/usr/share/rime-data/ | ||
} | ||
|
||
package_rime-lmdg-config() { | ||
depends=("${pkgbase}") | ||
|
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,11 @@ | ||
#!/usr/bin/python3 | ||
def pre_build(): | ||
_release_tag = _G.newver | ||
|
||
for line in edit_file("PKGBUILD"): | ||
if line.startswith("_release_tag="): | ||
line = f"_release_tag={_release_tag}" | ||
print(line) | ||
|
||
pkgver = _release_tag.lstrip("v").replace("-", "_").lower() | ||
update_pkgver_and_pkgrel(pkgver) |
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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
maintainers: | ||
- github: everyx | ||
|
||
pre_build_script: | | ||
update_pkgver_and_pkgrel(_G.newver) | ||
post_build_script: | | ||
git_pkgbuild_commit() | ||
update_on: | ||
- source: github | ||
github: amzxyz/RIME-LMDG | ||
use_latest_release: true | ||
prefix: v |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
n3m1-zh-hans: | ||
zh-hans: | ||
grammar: | ||
collocation_max_length: 5 | ||
collocation_min_length: 2 | ||
language: amz-v2n3m1-zh-hans | ||
language: wanxiang-zh-hans | ||
translator/contextual_suggestions: true | ||
translator/max_homophones: 7 | ||
translator/max_homographs: 7 |
This file was deleted.
Oops, something went wrong.