##Windows環境にvagrant(1.4)をインストール
###Oracle Virtual Boxをインストール
https://www.virtualbox.org/wiki/Downloads
最新(2014/2/14時点)は4.3.6だが、自分は4.2.18で動作確認済。
###Vagrant(1.4.X)をインストール
##Windows環境にvagrant(1.4)をインストール
###Oracle Virtual Boxをインストール
https://www.virtualbox.org/wiki/Downloads
最新(2014/2/14時点)は4.3.6だが、自分は4.2.18で動作確認済。
###Vagrant(1.4.X)をインストール
※Vagrantが既にインストール済みの状態からの説明です。
以下のURLからインストールしたいOSのURLを探してくる。
ここではOfficial Ubuntu 12.10 daily Cloud Image amd64 (Guest Additions)を利用することにする。
| #coding:utf-8 | |
| import math | |
| import sys | |
| from collections import defaultdict | |
| class NaiveBayes: | |
| def __init__(self): | |
| self.categories = set() | |
| self.vocabularies = set() | |
| self.wordcount = {} |
| # coding: utf-8 | |
| import MeCab | |
| import math | |
| class Bayesian(object): | |
| term_count = {} | |
| cat_count = {} | |
| def __init__(self): |