小写分词器
编辑小写分词器
编辑lowercase
分词器,与 letter
分词器 类似,会在遇到非字母字符时将文本分割为词项,但它还会将所有词项转换为小写。它的功能等同于 letter
分词器 与 lowercase
词项过滤器 的组合,但效率更高,因为它在单个过程中执行这两个步骤。
示例输出
编辑resp = client.indices.analyze( tokenizer="lowercase", text="The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.", ) print(resp)
response = client.indices.analyze( body: { tokenizer: 'lowercase', text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." } ) puts response
const response = await client.indices.analyze({ tokenizer: "lowercase", text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone.", }); console.log(response);
POST _analyze { "tokenizer": "lowercase", "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." }
上述句子将生成以下词项:
[ the, quick, brown, foxes, jumped, over, the, lazy, dog, s, bone ]
配置
编辑lowercase
分词器不可配置。