Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active March 18, 2018 08:45
Show Gist options
  • Save githubutilities/4c4106e60a0077971cf6cbb3c7cc3c8a to your computer and use it in GitHub Desktop.
Save githubutilities/4c4106e60a0077971cf6cbb3c7cc3c8a to your computer and use it in GitHub Desktop.
Get and build crfsuite
#! /usr/bin/env bash
#sudo apt-get install --yes autoconf
WORKING_DIR=`pwd`
LIBLBFGS_GIT=https://github.com/chokkan/liblbfgs.git
LIBLBFGS_SRC_DIR=./liblbfgs/
LIBLBFGS_INSTALL_DIR=$WORKING_DIR/local/lbfgs/
CRFSUITE_GIT=https://github.com/chokkan/crfsuite.git
CRFSUITE_SRC_DIR=./crfsuite/
CRFSUITE_INSTALL_DIR=$WORKING_DIR/local/crfsuite/
if [ ! -d $LIBLBFGS_SRC_DIR ]; then
git clone $LIBLBFGS_GIT $LIBLBFGS_SRC_DIR
fi;
cd $LIBLBFGS_SRC_DIR
./autogen.sh
./configure --prefix=$LIBLBFGS_INSTALL_DIR
make clean && make && make install
cd $WORKING_DIR
if [ ! -d $CRFSUITE_SRC_DIR ]; then
git clone $CRFSUITE_GIT $CRFSUITE_SRC_DIR
fi;
cd $CRFSUITE_SRC_DIR
./autogen.sh
./configure --prefix=$CRFSUITE_INSTALL_DIR --with-liblbfgs=$LIBLBFGS_INSTALL_DIR
make clean && make && make install
# Reference
# *http://blog.csdn.net/max_r/article/details/38757509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment