-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 1.18 KB
/
Makefile
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
40
41
42
43
44
clean:
go clean -testcache && rm -r ./bin
update:
go get -u ./... && go mod tidy
buildfoma_de:
cd src && \
foma -e "source de/tokenizer.xfst" \
-e "save stack ../testdata/tokenizer_de.fst" -q -s && \
cd ..
buildfoma_en:
cd src && \
foma -e "source en/tokenizer.xfst" \
-e "save stack ../testdata/tokenizer_en.fst" -q -s && \
cd ..
buildmatok_de: buildfoma_de build
./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.matok
buildmatok_en: buildfoma_en build
./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.matok
builddatok_de: buildfoma_de build
./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.datok -d
builddatok_en: buildfoma_en build
./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.datok -d
test:
go test ./...
test_clitic:
foma -e "source testdata/clitic_test.xfst" \
-e "save stack testdata/clitic_test.fst" -q -s && \
./bin/datok convert -i ./testdata/clitic_test.fst -o ./testdata/clitic_test.matok && \
go test ./... -timeout 30s -run ^TestMatrixCliticRule$
build:
go build -v -o ./bin/datok ./cmd/datok.go
benchmark:
go test -bench=. -test.benchmem