🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 指纹分析器 fingerprint 分析器实现了OpenRefine项目使用的[指纹识别算法](https://github.com/OpenRefine/OpenRefine/wiki/Clustering-In-Depth#fingerprint)来协助聚类。 输入文本较低,规范化以删除扩展字符,排序,重复数据删除并连接到单个令牌。 如果配置了一个停用词列表,停止单词也将被删除。 **定义** 它包括: 分词器 * [Standard Tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-standard-tokenizer.html "Standard Tokenizer") 词语过滤器 * [Lower Case Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-lowercase-tokenfilter.html "Lowercase Token Filter") * [ASCII Folding Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-asciifolding-tokenfilter.html "ASCII Folding Token Filter") * [Stop Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-stop-tokenfilter.html "Stop Token Filter") (默认禁用) * [Fingerprint Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-fingerprint-tokenfilter.html "Fingerprint Token Filter") ## **输出实例** | `POST _analyze` `{` `"analyzer"``: ``"fingerprint"``,` `"text"``: ``"Yes yes, Gödel said this sentence is consistent and."` `}` | 上述的句子将产生以下的词语: | `[ and consistent godel is said sentence ``this` `yes ]` | ## **配置**  fingerprint(指纹)分析器接受以下的参数: | `separator` | 用于连接条款的字符。 默认为空格。 | | `max_output_size` | 要发出的最大标记大小。 默认为255.大于此大小的token将被丢弃。 | | `stopwords` | 预定义的停止词列表,如_english_或包含停止词列表的数组。 默认为\ _none_。 | | `stopwords_path` | 包含停止词的文件的路径。 | 有关停止字配置的更多信息,请参阅 [Stop Token Filter](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analysis-stop-tokenfilter.html "Stop Token Filter")。   ## **配置实例** 在这个例子中,我们配置 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 ]` |