mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
👍
This commit is contained in:
parent
b383172210
commit
0610f64ad9
@ -20,7 +20,13 @@ export default class Categorizer {
|
||||
}
|
||||
|
||||
private tokenizer(text: string) {
|
||||
return this.mecab.wakachiSync(text);
|
||||
const tokens = this.mecab.parseSync(text)
|
||||
// 名詞だけに制限
|
||||
.filter(token => token[1] === '名詞')
|
||||
// 取り出し
|
||||
.map(token => token[0]);
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
public async init() {
|
||||
|
Loading…
Reference in New Issue
Block a user