blob: b6fb810eeb9788e911c8fd7a2a05d4019bc06382 [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" \
Akron0139bc52023-08-31 16:35:58 +020010 -e "save stack ../testdata/tokenizer_de.fst" -q -s && \
Akron7e75ef02021-11-06 13:19:45 +010011 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
Akron0139bc52023-08-31 16:35:58 +020020 ./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.matok
Akron7e75ef02021-11-06 13:19:45 +010021
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
Akron0139bc52023-08-31 16:35:58 +020025builddatok_de: buildfoma_de build
26 ./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.datok -d
Akron7e75ef02021-11-06 13:19:45 +010027
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