1. 指纹分析器

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-fingerprint-analyzer.html(修改该链接为官网对应的链接)

译文链接 : http://www.apache.wiki/display/Elasticsearch/analysis-fingerprint-analyzer.html(修改该链接为 ApacheCN 对应的译文链接)

贡献者 : @您的名字,ApacheCNApache中文网

fingerprint 分析器实现了OpenRefine项目使用的指纹识别算法来协助聚类。

输入文本较低,规范化以删除扩展字符,排序,重复数据删除并连接到单个令牌。 如果配置了一个停用词列表,停止单词也将被删除。

定义

它包括:

分词器

词语过滤器

1.1. 输出实例

POST _analyze
{
  "analyzer": "fingerprint",
  "text": "Yes yes, Gödel said this sentence is consistent and."
}
上述的句子将产生以下的词语:
[ and consistent godel is said sentence this yes ]

1.2. 配置

fingerprint(指纹)分析器接受以下的参数:

| separator | 用于连接条款的字符。 默认为空格。 | | max_output_size | 要发出的最大标记大小。 默认为255.大于此大小的token将被丢弃。 | | stopwords | 预定义的停止词列表,如english或包含停止词列表的数组。 默认为\ none。 | | stopwords_path | 包含停止词的文件的路径。 |

有关停止字配置的更多信息,请参阅 Stop Token Filter

1.3. 配置实例

在这个例子中,我们配置 fingerprint 分析器以使用预定义的英文停止词列表:

PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_fingerprint_analyzer": {
          "type": "fingerprint",
          "stopwords": "_english_"
        }
      }
    }
  }
}

POST my_index/_analyze
{
  "analyzer": "my_fingerprint_analyzer",
  "text": "Yes yes, Gödel said this sentence is consistent and."
}

以上示例产生以下词语:

[ consistent godel said sentence yes ]
Copyright © Kilvn 2021. all right reserved,powered by Gitbook最后更新时间: 2021-06-08 20:22:42

results matching ""

    No results matching ""