Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 1 | clean: |
| 2 | go clean -testcache && rm -r ./bin |
| 3 | |
Akron | 96c6548 | 2023-02-28 09:08:48 +0100 | [diff] [blame] | 4 | update: |
| 5 | go get -u ./... && go mod tidy |
| 6 | |
Akron | be3d366 | 2023-04-26 13:22:38 +0200 | [diff] [blame] | 7 | buildfoma_de: |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 8 | cd src && \ |
Akron | 78f6714 | 2022-04-09 14:10:44 +0200 | [diff] [blame] | 9 | foma -e "source de/tokenizer.xfst" \ |
Akron | 0139bc5 | 2023-08-31 16:35:58 +0200 | [diff] [blame] | 10 | -e "save stack ../testdata/tokenizer_de.fst" -q -s && \ |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 11 | cd .. |
| 12 | |
Akron | be3d366 | 2023-04-26 13:22:38 +0200 | [diff] [blame] | 13 | buildfoma_en: |
| 14 | cd src && \ |
| 15 | foma -e "source en/tokenizer.xfst" \ |
| 16 | -e "save stack ../testdata/tokenizer_en.fst" -q -s && \ |
| 17 | cd .. |
| 18 | |
Akron | 72a6422 | 2023-04-26 17:00:45 +0200 | [diff] [blame] | 19 | buildmatok_de: buildfoma_de build |
Akron | 0139bc5 | 2023-08-31 16:35:58 +0200 | [diff] [blame] | 20 | ./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.matok |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 21 | |
Akron | be3d366 | 2023-04-26 13:22:38 +0200 | [diff] [blame] | 22 | buildmatok_en: buildfoma_en build |
| 23 | ./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.matok |
| 24 | |
Akron | 0139bc5 | 2023-08-31 16:35:58 +0200 | [diff] [blame] | 25 | builddatok_de: buildfoma_de build |
| 26 | ./bin/datok convert -i ./testdata/tokenizer_de.fst -o ./testdata/tokenizer_de.datok -d |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 27 | |
Akron | 72a6422 | 2023-04-26 17:00:45 +0200 | [diff] [blame] | 28 | builddatok_en: buildfoma_en build |
| 29 | ./bin/datok convert -i ./testdata/tokenizer_en.fst -o ./testdata/tokenizer_en.datok -d |
| 30 | |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 31 | test: |
| 32 | go test ./... |
| 33 | |
Akron | 72a6422 | 2023-04-26 17:00:45 +0200 | [diff] [blame] | 34 | test_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 | |
Akron | 7e75ef0 | 2021-11-06 13:19:45 +0100 | [diff] [blame] | 40 | build: |
| 41 | go build -v -o ./bin/datok ./cmd/datok.go |
Akron | 3976804 | 2021-11-10 07:18:02 +0100 | [diff] [blame] | 42 | |
| 43 | benchmark: |
| 44 | go test -bench=. -test.benchmem |