ngram.sh 475 字节
Newer Older
H
Hui Zhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
set -e
set -x

# need support c++17, so need gcc >= 8
# openfst
ngram=ngram-1.3.13
shared=true

test -e ${ngram}.tar.gz || wget http://www.openfst.org/twiki/pub/GRM/NGramDownload/${ngram}.tar.gz
test -d ${ngram} || tar -xvf ${ngram}.tar.gz && chown -R root:root ${ngram}

if [ $shared == true ];then
    pushd ${ngram} && ./configure --enable-shared && popd
else
    pushd ${ngram} && ./configure --enable-static && popd
fi
pushd ${ngram} && make -j &&  make install && popd