<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Synonym Token Filter(Synonym 詞元過濾器) 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html) 譯文鏈接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10028859](http://www.apache.wiki/pages/viewpage.action?pageId=10028859) 貢獻者 : [fucker](/display/~caizhongjie),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) **`synonym`?(同義詞)**詞元過濾器允許在分析過程中輕松處理同義詞。 同義詞使用配置文件配置。示例如下: ``` PUT /test_index { "settings": { "index" : { "analysis" : { "analyzer" : { "synonym" : { "tokenizer" : "whitespace", "filter" : ["synonym"] } }, "filter" : { "synonym" : { "type" : "synonym", "synonyms_path" : "analysis/synonym.txt" } } } } } } ``` 以上配置一個?**`synonym`?**(同義詞)過濾器,其中包含一個路徑 **analysis/synonym.txt**(相對于?**config **的位置)。 然后使用過濾器配置 **`synonym`??**同義詞分析器。 其他設置有:**ignore_case**(默認為 **false**),和 **`expand`?**(默認為 **true**)。 **tokenizer** 參數控制將用于標記同義詞的分詞器,并且默認為 **`whitespace`**??分詞器。 支持兩種同義詞格式:**Solr,WordNet**。 #### **Solr synonyms** 以下是文件的示例格式: ``` # Blank lines and lines starting with pound are comments. # Explicit mappings match any token sequence on the LHS of "=>" # and replace with all alternatives on the RHS. These types of mappings # ignore the expand parameter in the schema. # Examples: i-pod, i pod => ipod, sea biscuit, sea biscit => seabiscuit # Equivalent synonyms may be separated with commas and give # no explicit mapping. In this case the mapping behavior will # be taken from the expand parameter in the schema. This allows # the same synonym file to be used in different synonym handling strategies. # Examples: ipod, i-pod, i pod foozball , foosball universe , cosmos lol, laughing out loud # If expand==true, "ipod, i-pod, i pod" is equivalent # to the explicit mapping: ipod, i-pod, i pod => ipod, i-pod, i pod # If expand==false, "ipod, i-pod, i pod" is equivalent # to the explicit mapping: ipod, i-pod, i pod => ipod # Multiple synonym mapping entries are merged. foo => foo bar foo => baz # is equivalent to foo => foo bar, baz ``` 您也可以在配置文件中直接給過濾器定義同義詞(請注意使用 **synonyms?**而不是 **synonyms_path?**): ``` PUT /test_index { "settings": { "index" : { "analysis" : { "filter" : { "synonym" : { "type" : "synonym", "synonyms" : [ "i-pod, i pod => ipod", "universe, cosmos" ] } } } } } } ``` 但是,建議使用 **synonyms_path?**在文件中定義大型同義詞集,因為內聯指定會不必要地增加群集大小。 #### **WordNet synonyms** 基于 WordNet 格式的 同義詞 可以如下使用格式聲明: ``` ?PUT /test_index { "settings": { "index" : { "analysis" : { "filter" : { "synonym" : { "type" : "synonym", "format" : "wordnet", "synonyms" : [ "s(100000001,1,'abstain',v,1,0).", "s(100000001,2,'refrain',v,1,0).", "s(100000001,3,'desist',v,1,0)." ] } } } } } } ``` 同時支持使用 **`synonyms_path`??**在文本中定義?**WordNet synonyms**。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看