blob: e8eddc5461fd5bf03d7d0a6965d0483022f56eb3 [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
Akron7e75ef02021-11-06 13:19:45 +010019buildmatok: buildfoma build
20 ./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
Akron7e75ef02021-11-06 13:19:45 +010025builddatok: buildfoma build
26 ./bin/datok convert -i ./testdata/tokenizer.fst -o ./testdata/tokenizer.datok -d
27
28test:
29 go test ./...
30
31build:
32 go build -v -o ./bin/datok ./cmd/datok.go
Akron39768042021-11-10 07:18:02 +010033
34benchmark:
35 go test -bench=. -test.benchmem