字母分词器
编辑字母分词器
编辑letter
分词器在遇到非字母字符时将文本分解成词项。对于大多数欧洲语言来说,它能很好地工作,但对于一些亚洲语言(这些语言中的单词之间没有空格)来说,效果很差。
示例输出
编辑resp = client.indices.analyze( tokenizer="letter", text="The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.", ) print(resp)
response = client.indices.analyze( body: { tokenizer: 'letter', text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." } ) puts response
const response = await client.indices.analyze({ tokenizer: "letter", text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.", }); console.log(response);
POST _analyze { "tokenizer": "letter", "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." }
上面这句话将产生以下词项
[ The, QUICK, Brown, Foxes, jumped, over, the, lazy, dog, s, bone ]
配置
编辑letter
分词器不可配置。