0
0

Merge pull request #343 from ikawaha/fix/ja_morph_kagome

Use a small version of kagome
This commit is contained in:
Marty Schoch 2016-03-13 17:53:27 -04:00
commit 0de657d3ca
2 changed files with 27 additions and 1 deletions

View File

@ -13,7 +13,7 @@ import (
"github.com/blevesearch/bleve/analysis"
"github.com/blevesearch/bleve/registry"
"github.com/ikawaha/kagome/tokenizer"
"github.com/ikawaha/kagome.ipadic/tokenizer"
)
const TokenizerName = "kagome"

View File

@ -41,6 +41,32 @@ func TestKagome(t *testing.T) {
},
},
},
{
[]byte("関西国際空港"),
analysis.TokenStream{
{
Start: 0,
End: 6,
Term: []byte("関西"),
Position: 1,
Type: analysis.Ideographic,
},
{
Start: 6,
End: 12,
Term: []byte("国際"),
Position: 2,
Type: analysis.Ideographic,
},
{
Start: 12,
End: 18,
Term: []byte("空港"),
Position: 3,
Type: analysis.Ideographic,
},
},
},
}
tokenizer := NewKagomeMorphTokenizer()