blob: 570bf29d723a592cc90e9b1998bb95919bdd0003 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: Arzet Ro <arzeth0@gmail.com>
pkgname=python-wetextprocessing
pkgver=1.0.4.1
pkgrel=1
pkgdesc="Text Normalization & Inverse Text Normalization"
arch=('any')
url="https://github.com/wenet-e2e/WeTextProcessing"
license=('Apache-2.0')
depends=('python' 'python-flake8' 'python-importlib_resources' 'python-pynini')
makedepends=('python-setuptools' 'cython') # python-pbr?
source=(https://files.pythonhosted.org/packages/source/w/WeTextProcessing/WeTextProcessing-$pkgver.tar.gz)
sha512sums=('bdafa84c058beb695232abcec37a6425f9604912355bbda5fe2f591ac34ab730816efe617c2fb45d0e8a93f22340af70c02037d3a9cbe2a517d4c8bb44d9aef7')
# It can also be used in CLI:
# Chinese Text Normalization
# wetn --text '苹果宣布发布新IPHONE'
# Inverse Text Normalization:
# weitn --text '二点五平方电线'
# They also have cpp runtime
# but is it worth adding it here (i.e. make this a double package)?
build() {
cd "$srcdir"/WeTextProcessing-$pkgver
# If using .tar.gz from GitHub instead of pythonhosted.org,
# then uncomment this line:
# pre-commit install
# And also add `pre-commit` to `makedepends=(...)`
python setup.py build --version="1.0.4.1"
# or without `-1` shound
}
package() {
cd "$srcdir"/WeTextProcessing-$pkgver
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build --version="1.0.4.1"
}
|