jieba icon indicating copy to clipboard operation
jieba copied to clipboard

paddle模式使用add_word&suggest_freq以及自定义词典无效

Open Simon-200 opened this issue 4 years ago • 9 comments

image

Simon-200 avatar May 28 '20 03:05 Simon-200

解决了吗?

p-moon avatar Jun 04 '20 10:06 p-moon

@Simon-plus @Pf-G 非常败兴的一个问题,提供一个解决方案,就是不要在代码里用add_word加词典,而是把所有要加的词,直接加到你的userdict.txt词典中去,即可解决。

yanchidezhang avatar Jul 30 '20 08:07 yanchidezhang

OK,thanks

喻思蒙 [email protected]

------------------ 原始邮件 ------------------ 发件人: Yanchi De Zhang <[email protected]> 发送时间: 2020年7月30日 16:16 收件人: fxsjy/jieba <[email protected]> 抄送: Simon-plus <[email protected]>, Mention <[email protected]> 主题: 回复:[fxsjy/jieba] paddle模式使用add_word&suggest_freq以及自定义词典无效 (#856)

@Simon-plus @Pf-G 非常败兴的一个问题,提供一个解决方案,就是不要在代码里用add_word加词典,而是把所有要加的词,直接加到你的userdict.txt词典中去,即可解决。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Simon-200 avatar Jul 30 '20 09:07 Simon-200

这个你是怎么解决的?paddle模式下用自定义的词典是无效的,这是怎么回事?

wssf812 avatar Aug 19 '20 01:08 wssf812

看了下代码好像paddle模式的结果是直接使用训练好的crf模型参数(model_baseline)直接进行预测的,并不会加载自定义的词典相关信息,所以好像无法设置自定义的内容。

oasis-0927 avatar Oct 10 '20 07:10 oasis-0927

使用userdict.txt词典也是没有用。。

1JasonZhang avatar Oct 20 '20 09:10 1JasonZhang

使用userdict.txt词典也是没有用。。

https://github.com/fxsjy/jieba/issues/881#issuecomment-702209839

可以看看这个,是否有用

returnWOW avatar Oct 20 '20 12:10 returnWOW

@returnWOW 试了下add_word时指定一个很大的频率,不管用,应该是像 @JuntingGuo 说的那样,paddle模式使用训练好的模型参数预测,自定义的操作不对其起作用

NemoHoHaloAi avatar Nov 18 '20 10:11 NemoHoHaloAi