Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

拆成单个汉字有多种发音问题请问该如何解决? #270

Open
kely2019 opened this issue May 11, 2022 · 1 comment
Open

拆成单个汉字有多种发音问题请问该如何解决? #270

kely2019 opened this issue May 11, 2022 · 1 comment

Comments

@kely2019
Copy link

看了之前的lssue,没找到解决方案。
如:行结果是xing,导致银行yinhang或者yh查询不到,其他多音字也存在这个问题。
get _analyze
{
"analyzer": "pinyin",
"text":"行"
}
我的模板,因为业务需求,我分词成单个汉字了
PUT user_index
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1
},
"analysis": {
"analyzer": {
"pinyin_analyzer": {
"tokenizer":"standard",
"filter":["my_pinyin"]
}
},
"filter":{
"my_pinyin":{
"type":"pinyin",
"keep_first_letter":true,
"keep_separate_first_letter":true,
"keep_full_pinyin":true,
"keep_original": true,
"limit_first_letter_length": 16,
"lowercase": true
}
}

}

},
"mappings": {
"dynamic": false,
"properties": {
"nickName": {
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"store": false,
"analyzer": "pinyin_analyzer"
}
}
}
}
}
}
我相信有很多人遇到这个问题!请问有解决的方法么?谢谢!

@aabondv
Copy link

aabondv commented May 19, 2022

nlp-lang v1.7 银行这个拼音有问题,换成最新版本就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants