Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix makefile test with modelfile #6

Merged
merged 8 commits into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
# Dependency directories (remove the comment below to include it)
# vendor/
.vscode

__debug_bin

ModelGenerator/
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.PHONY: test
test:
test: ModelGenerator/default.dict
go test ./...

ModelGenerator/default.dict:
curl -L https://github.com/bab2min/Kiwi/releases/download/v0.10.1/kiwi_model_v0.10.1.tgz --output model.tgz
tar -xzvf model.tgz
rm -f model.tgz

.PHONY: clean
clean:
rm -f model.tgz
rm -rf ./ModelGenerator
mrchypark marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion kiwi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func TestKiwiVersion(t *testing.T) {
}

func TestAnalyze(t *testing.T) {
kiwi := New("./libs/kiwi/ModelGenerator", 1, KIWI_BUILD_DEFAULT)
kiwi := New("./ModelGenerator", 1, KIWI_BUILD_DEFAULT)
res := kiwi.Analyze("아버지가 방에 들어가신다", 1, KIWI_MATCH_ALL)
assert.NotEqual(t, 0, res.Score)
}