This model has order 7 but KenLM was compiled to support up to 6. If your build system supports changing KENLM_MAX_ORDER, change it there and recompile. With cmake: cmake -DKENLM_MAX_ORDER=10 .. With Moses: bjam --max-kenlm-order=10 -a Otherwise, edit lm/max_order.hh.
解决办法:
pip uninstall kenlm
git clone git@github.com:kpu/kenlm.git
cd kenlm
mkdir build && cd build
cmake -DKENLM_MAX_ORDER=10 .. && make -j8
cd ..
python setup.py install --max_order=10