Skip to content

Commit

Permalink
Add bench make command
Browse files Browse the repository at this point in the history
  • Loading branch information
vikesh-raj committed Nov 3, 2020
1 parent 8d42322 commit 1be0fae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test clean
.PHONY: test bench clean

sentencepiece/sentencepiece_model.pb.go: sentencepiece/sentencepiece_model.proto
protoc --go_out=. $<
Expand All @@ -10,5 +10,8 @@ cmd/dumpspm/dumpspm: cmd/dumpspm/main.go
test:
go test -cover -coverprofile=c.out ./sentencepiece && go tool cover -html=c.out -o coverage.html

bench:
go test -benchmem ./sentencepiece -bench Benchmark.*

clean:
rm -f *.out coverage.html cmd/dumpspm/dumpspm
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Sentence Piece Encoder
======================

This is pure go implementation of the sentencepiece encoder.
It takes a sentencepiece model and tokenizes it.
Create an encoder for the given sentencepiece model and then use
use the `Tokenize` function to split the input text into tokens.

Example:

Expand Down

0 comments on commit 1be0fae

Please sign in to comment.