Code Monkey home page Code Monkey logo

Comments (11)

shi-yuan avatar shi-yuan commented on June 26, 2024

如果是通过analyzer自定义的分词器,确实是存在问题的,如果用tokenizer是ok的

#164

from elasticsearch-analysis-ansj.

shi-yuan avatar shi-yuan commented on June 26, 2024

通过analyzer自定义的分词器的问题,近期会考虑修复

from elasticsearch-analysis-ansj.

hhalei avatar hhalei commented on June 26, 2024

如图配置自定义词典,dic_finance 和 dic_d3 均未生效,只有dic生效了,是使用姿势不对吗

image
#193 @shi-yuan

from elasticsearch-analysis-ansj.

shi-yuan avatar shi-yuan commented on June 26, 2024

配置没毛病,未生效,是根本就没加载,还是刷新不起作用?

from elasticsearch-analysis-ansj.

hhalei avatar hhalei commented on June 26, 2024

配置没毛病,未生效,是根本就没加载,还是刷新不起作用?

下面是我 _cat/ansj/config 的结果:
{ "synonyms": [ "synonyms" ], "dic_d3": "jdbc://jdbc:mysql://xxxx:6103/auto_es?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull|bip|bip@bip|select word as name,nature,freq from auto_es.ansj_dict where status=1", "ambiguity": [ "ambiguity" ], "stop": [ "stop" ], "crf": [ "crf" ], "dic_finance": "/config/elasticsearch-analysis-ansj/dict/finance_words.dic", "isQuantifierRecognition": "true", "isRealName": "false", "isNameRecognition": "true", "isNumRecognition": "true", "dic": [ "dic_finance", "dic_d3", "dic" ] }

我觉得应该是加载了,但是最后的 "dic":["dic_finance","dic_d3","dic"] 这个没生效,dic应该默认使用的只有dic这个key指定的词库列表,"dic_finance","dic_d3"两个key对应的词库列表里的词没生效。
@shiyuan

from elasticsearch-analysis-ansj.

shi-yuan avatar shi-yuan commented on June 26, 2024

"dic_finance","dic_d3"这俩词典,在分词器里使用了么,mapping是如何配置的?

from elasticsearch-analysis-ansj.

hhalei avatar hhalei commented on June 26, 2024

"dic_finance","dic_d3"这俩词典,在分词器里使用了么,mapping是如何配置的?

analyzer 用的默认的 index_ansj,没有单独设置其他配置

from elasticsearch-analysis-ansj.

shi-yuan avatar shi-yuan commented on June 26, 2024

不配置的话,用的默认的配置,dic只会取key为dic的词典

from elasticsearch-analysis-ansj.

hhalei avatar hhalei commented on June 26, 2024

dic只会取key为dic的词典

好的,我再试一下,感谢支持!

from elasticsearch-analysis-ansj.

yushanhang avatar yushanhang commented on June 26, 2024

from elasticsearch-analysis-ansj.

shi-yuan avatar shi-yuan commented on June 26, 2024

可以的,自定义分词器,使用多个词典

{
...
"dic": "dic,dic_0",
"stop": "stop,stop_0",
"ambiguity": "ambiguity,ambiguity_0",
"synonyms": "synonyms,synonyms_0",
...
}

from elasticsearch-analysis-ansj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.