環境
- python2.7
- docker
原因
下記のコマンドでいれたfasttextがダメだった。
pip install fasttext
この状態で以下を実行しても
model = fastText.load_model('test.bin')
エラーが発生する
Exception: fastText: Cannot load model.bin due to C++ extension failed to allocate the memory
解決方法
ちゃんとfacebook公式のfasttextの導入にしたがってやるべき
https://github.com/facebookresearch/fastText/tree/master/python
$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ python setup.py install