blob: 05981c6b312525b19b0e54cc1158a7faba71430f [file] [log] [blame]
Akron7e75ef02021-11-06 13:19:45 +01001clean:
2 go clean -testcache && rm -r ./bin
3
Akron96c65482023-02-28 09:08:48 +01004update:
5 go get -u ./... && go mod tidy
6
Akronbe3d3662023-04-26 13:22:38 +02007buildfoma_de:
Akron7e75ef02021-11-06 13:19:45 +01008 cd src && \
Akron78f67142022-04-09 14:10:44 +02009 foma -e "source de/tokenizer.xfst" \
Akron7e75ef02021-11-06 13:19:45 +010010 -e "save stack ../testdata/tokenizer.fst" -q -s && \
11 cd ..
12
Akronbe3d3662023-04-26 13:22:38 +020013buildfoma_en:
14 cd src && \
15 foma -e "source en/tokenizer.xfst" \
16 -e "save stack ../testdata/tokenizer_en.fst" -q -s && \
17 cd ..
18
Akron72a64222023-04-26 17:00:45 +020019buildmatok_de: buildfoma_de build
Akron7e75ef02021-11-06 13:19:45 +010020 ./bin/datok convert -i ./testdata/tokenizer.fst -o ./testdata/tokenizer.matok
21
Akronbe3d3662023-04-26 13:22:38 +020022buildmatok_en: buildfoma_en build
23 ./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.matok
24
Akron72a64222023-04-26 17:00:45 +020025builddatok: buildfoma_de build
Akron7e75ef02021-11-06 13:19:45 +010026 ./bin/datok convert -i ./testdata/tokenizer.fst -o ./testdata/tokenizer.datok -d
27
Akron72a64222023-04-26 17:00:45 +020028builddatok_en: buildfoma_en build
29 ./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.datok -d
30
Akron7e75ef02021-11-06 13:19:45 +010031test:
32 go test ./...
33
Akron72a64222023-04-26 17:00:45 +020034test_clitic:
35 foma -e "source testdata/clitic_test.xfst" \
36 -e "save stack testdata/clitic_test.fst" -q -s && \
37 ./bin/datok convert -i ./testdata/clitic_test.fst -o ./testdata/clitic_test.matok && \
38 go test ./... -timeout 30s -run ^TestMatrixCliticRule$
39
Akron7e75ef02021-11-06 13:19:45 +010040build:
41 go build -v -o ./bin/datok ./cmd/datok.go
Akron39768042021-11-10 07:18:02 +010042
43benchmark:
44 go test -bench=. -test.benchmem