v2.4.1 英文单词被强行拆分成很多字母
eisneim opened this issue · 3 comments
eisneim commented
按理来说是应该不是拆分英文单词的,但是我搜了issue没有看到有人又这个问题
const nodejieba = require("nodejieba")
nodejieba.load({
dict: nodejieba.DEFAULT_DICT,
hmmDict: nodejieba.DEFAULT_HMM_DICT,
idfDict: nodejieba.DEFAULT_IDF_DICT,
stopWordDict: nodejieba.DEFAULT_STOP_WORD_DICT,
})
nodejieba.cut("呼-Swoosh hollow")
// [ '呼呼', '-', 'S', 'w', 'o', 'o', 's', 'h', ' ', 'l', 'o', 'w' ] 呼呼 S w o o s h h o l l o w
是需要载入其他字典吗?
求解答,thanks
idweball commented
poyingatsounon commented
同樣問題
poyingatsounon commented
import jieba from 'nodejieba';
jieba.cut('hello world', true);
這樣就好了