kuromoji_number 分词过滤器
编辑kuromoji_number
分词过滤器编辑
kuromoji_number
分词过滤器将日语数字(汉字)标准化为半角字符的常规阿拉伯十进制数字。 例如
PUT kuromoji_sample { "settings": { "index": { "analysis": { "analyzer": { "my_analyzer": { "tokenizer": "kuromoji_tokenizer", "filter": [ "kuromoji_number" ] } } } } } } GET kuromoji_sample/_analyze { "analyzer": "my_analyzer", "text": "一〇〇〇" }
结果为
{ "tokens" : [ { "token" : "1000", "start_offset" : 0, "end_offset" : 4, "type" : "word", "position" : 0 } ] }