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

Spring Boot怎么当一个词切出来? #926

Open
jacktang opened this issue Jun 18, 2021 · 2 comments
Open

Spring Boot怎么当一个词切出来? #926

jacktang opened this issue Jun 18, 2021 · 2 comments

Comments

@jacktang
Copy link

已经看过 #14
尝试过

  1. 加入词典
Spring Boot 500000 nz
  1. 使用 suggest_freq
jieba.suggest_freq(('Spring Boot'), True)

content = "小明的工作是从事大数据和Spring Boot开发"
words = pseg.cut(content)

结果都是Spring和Boot分开,请问要怎么做才能当成专有名词?

@jacktang
Copy link
Author

字典里使用

"Spring Boot" 500000 nz

也无效

@fengrk
Copy link

fengrk commented Sep 29, 2021

import re
import jieba

jieba.re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9α-ωΑ-Ω+#&\._%\- ,,]+)", re.U)

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