Skip to content

Commit

Permalink
Merge pull request #5110 from kamo-naoyuki/kenlm
Browse files Browse the repository at this point in the history
Update installers/install_kenlm.sh
  • Loading branch information
mergify[bot] committed Apr 14, 2023
2 parents ce13ba7 + 4c522e1 commit bb39bb6
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions tools/installers/install_kenlm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,36 @@ if [ $# != 0 ]; then
exit 1;
fi

rm -rf kenlm
git clone https://github.com/kpu/kenlm.git
boost_version=1.81.0

if [ ! -d boost_${boost_version//./_} ]; then
if [ ! -e "boost_"${boost_version//./_}".tar.bz2" ]; then
wget --no-check-certificate https://boostorg.jfrog.io/artifactory/main/release/"${boost_version}"/source/boost_"${boost_version//./_}".tar.bz2
fi
tar xvf boost_"${boost_version//./_}".tar.bz2
fi

if [ ! -d boost_${boost_version//./_}_build ]; then
(
set -euo pipefail
cd boost_${boost_version//./_}
./bootstrap.sh
./b2 install --prefix=$(pwd)/../boost_${boost_version//./_}_build install
)
fi

if [ ! -d kenlm ]; then
git clone https://github.com/kpu/kenlm.git
fi

(
set -euo pipefail
cd kenlm

mkdir build
mkdir -p build
(
set -euo pipefail
cd build && cmake .. && make
cd build && cmake -DCMAKE_PREFIX_PATH=$(pwd)/../../boost_${boost_version//./_}_build .. && make
)
(
set -euo pipefail
Expand Down

0 comments on commit bb39bb6

Please sign in to comment.