2015-07-07 01:14:39 -04:00
|
|
|
# Integration tests for Kuromoji analysis components
|
2015-07-07 00:51:52 -04:00
|
|
|
#
|
|
|
|
"Tokenizer":
|
|
|
|
- do:
|
|
|
|
indices.analyze:
|
|
|
|
text: 関西国際空港
|
|
|
|
tokenizer: kuromoji_tokenizer
|
|
|
|
- length: { tokens: 4 }
|
|
|
|
- match: { tokens.0.token: 関西 }
|
|
|
|
- match: { tokens.1.token: 関西国際空港 }
|
|
|
|
- match: { tokens.2.token: 国際 }
|
|
|
|
- match: { tokens.3.token: 空港 }
|
|
|
|
---
|
|
|
|
"Baseform filter":
|
|
|
|
- do:
|
|
|
|
indices.analyze:
|
|
|
|
text: 飲み
|
|
|
|
tokenizer: kuromoji_tokenizer
|
|
|
|
filters: kuromoji_baseform
|
|
|
|
- length: { tokens: 1 }
|
|
|
|
- match: { tokens.0.token: 飲む }
|
|
|
|
---
|
|
|
|
"Reading filter":
|
|
|
|
- do:
|
|
|
|
indices.analyze:
|
|
|
|
text: 寿司
|
|
|
|
tokenizer: kuromoji_tokenizer
|
|
|
|
filters: kuromoji_readingform
|
|
|
|
- length: { tokens: 1 }
|
|
|
|
- match: { tokens.0.token: sushi }
|
|
|
|
---
|
|
|
|
"Stemming filter":
|
|
|
|
- do:
|
|
|
|
indices.analyze:
|
|
|
|
text: サーバー
|
|
|
|
tokenizer: kuromoji_tokenizer
|
|
|
|
filters: kuromoji_stemmer
|
|
|
|
- length: { tokens: 1 }
|
|
|
|
- match: { tokens.0.token: サーバ }
|