fastTextの覚え書き
公式
公式のGitHubのリポジトリは下記。詳しいインストール方法についてはREADMEを参照。
fastText : https://github.com/facebookresearch/fastText
環境
今回試してみた環境は下記。
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
pythonをインストール
事前にpythonおよびnumpy、scipyを準備しておく。Anacondaが便利。
- Anaconda : https://www.continuum.io
$ wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
c++をインストール
fastTextをmakeするために、c++が必要。もし入っていなければ下記コマンドでインストールする。
$ sudo apt-get install build-essential
fastTextを準備
GitHubからダウンロード、インストール。
$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ make
学習済みモデルをダウンロード
リポジトリで配布されている日本語の学習済みモデルをダウンロードする。
$ wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/wiki.ja.zip .
編集中