Fix bug
This commit is contained in:
parent
a629840644
commit
5b36fe0e3a
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ const mecab = new MeCab();
|
||||||
if (config.analysis.mecab_command) mecab.command = config.analysis.mecab_command;
|
if (config.analysis.mecab_command) mecab.command = config.analysis.mecab_command;
|
||||||
|
|
||||||
function tokenize(text: string) {
|
function tokenize(text: string) {
|
||||||
const tokens = this.mecab.parseSync(text)
|
const tokens = mecab.parseSync(text)
|
||||||
// キーワードのみ
|
// キーワードのみ
|
||||||
.filter(token => token[1] == '名詞' && (token[2] == '固有名詞' || token[2] == '一般'))
|
.filter(token => token[1] == '名詞' && (token[2] == '固有名詞' || token[2] == '一般'))
|
||||||
// 取り出し
|
// 取り出し
|
||||||
|
|
Loading…
Reference in a new issue