1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-11 21:29:08 +09:00
This commit is contained in:
syuilo 2017-09-07 13:31:31 +09:00
parent e891b34d61
commit 1ed468911e
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ type Source = {
hook_secret: string; hook_secret: string;
username: string; username: string;
}; };
categorizer?: { analysis?: {
mecab_command?: string; mecab_command?: string;
}; };
}; };

View File

@ -5,7 +5,7 @@ import User from '../../api/models/user';
import config from '../../conf'; import config from '../../conf';
const mecab = new MeCab(); const mecab = new MeCab();
if (config.categorizer.mecab_command) mecab.command = config.categorizer.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 = this.mecab.parseSync(text)