1
0
This commit is contained in:
syuilo
2017-09-07 14:52:07 +09:00
parent af0dd26224
commit 1e3f93d68e
3 changed files with 135 additions and 13 deletions
+1 -3
View File
@@ -1,8 +1,7 @@
const bayes = require('./naive-bayes.js');
const MeCab = require('mecab-async');
const MeCab = require('./mecab');
import Post from '../../api/models/post';
import config from '../../conf';
/**
* 投稿を学習したり与えられた投稿のカテゴリを予測します
@@ -13,7 +12,6 @@ export default class Categorizer {
constructor() {
this.mecab = new MeCab();
if (config.categorizer.mecab_command) this.mecab.command = config.categorizer.mecab_command;
// BIND -----------------------------------
this.tokenizer = this.tokenizer.bind(this);