1. Shingle Token Filter(Shingle 词元过滤器)

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-shingle-tokenfilter.html

译文链接 : http://www.apache.wiki/pages/viewpage.action?pageId=10028515

贡献者 : fuckerApacheCNApache中文网

shingle 类型的词元过滤器,用于从词元流中构建 shinglestoken n-grams)。 换句话说,它创建词元的组合作为单个词元。 例如,句子 “please divide this sentence into shingles” ,可能会被划分为词组“please divide”,“divide this”,“this sentence”,“sentence into”和“into shingles”。

此过滤器通过插入 filler tokens(使用“_”的词元)来处理游标自增 > 1。游标不从0开始。

以下是 shingle 类型的词元过滤器的可选设置:

设置 描述
max_shingle_size 最大的 shingle 数量. 默认 2.
min_shingle_size 最小的 shingle 数量. 默认2.
output_unigrams 如果为 true 输出将会包含输入的 tokens (unigrams) 以及 shingles. 默认 true.
output_unigrams_if_no_shingles 如果 output_unigrams false ,如果没有可用的 shingles 输出将会包含输入的 tokens (unigrams). 提示 如果 output_unigrams true 当前设置不生效. 默认 false.
token_separator 连接相邻的词元生成词组的字符串. 默认 " ".
filler_token 用于替换流中每个没有实际词元的位置的字符串。例如,当 stop 过滤器与 shingle 过滤器一起使用时,如果位置增量大于1. 默认 "_"
Copyright © Kilvn 2021. all right reserved,powered by Gitbook最后更新时间: 2021-06-08 20:22:42

results matching ""

    No results matching ""