Clairlib Quick Start
Install System Libraries and Required Perl Modules
You need to have DBM and Expat system packages for some of the Clairlib modules to work. On ubuntu, simply type:
sudo apt-get install libdb-dev libexpat1-dev curl
On a different distribution, you have to look for the appropriate packages and install them.
We recommend Cpanminus, a new Perl package installer, for installing the required packages. Cpanminus does a great job of finding and installing dependencies compared to cpan. Install Cpanminus using:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
If you are trying to do a local installation in your home directory, remove the sudo in the above command.
Once you have cpanminus, run the following commands to install necessary Perl modules (again removing the sudo if you are doing a local installation)
sudo cpanm XML::Parser sudo cpanm BerkeleyDB sudo cpanm DBI sudo cpanm XML::Parser::PerlSAX sudo cpanm XML::Writer sudo cpanm Graph::Directed sudo cpanm Lingua::Stem sudo cpanm Statistics::ChisqIndep sudo cpanm MLDBM sudo cpanm Lingua::EN::Sentence sudo cpanm Math::MatrixReal sudo cpanm Text::Sentence sudo cpanm Math::Random sudo cpanm HTML::LinkExtractor sudo cpanm HTML::Parser
Download and configure Clairlib
Download and untar the latest Clairlib package:
wget http://clair.si.umich.edu/surveyor/clairlib-core-1.08.tar.gz tar -xvzf clairlib-core-1.08.tar.gz cd clairlib-core-1.08/
Now you have to do two things. Regenerate the IDF for your machine by using:
perl lib/bin/write-idf.pl etc/enidf etc/enidf.txt
Configure the paths in Clairlib installation. Two things are needed:
- Open blib/lib/Clair/Config.pm and change $CLAIRLIB_HOME to the correct location of clairlib-core-1.08 directory
- Open lib/Clair/Config.pm and change $CLAIRLIB_HOME to the correct location of clairlib-core-1.08 directory
Finally, add the complete path to the /PATH_TO_CLAIRLIB/lib directory to your $PERL5LIB.
Test your Installation
Now you are ready to test your installation. Run these:
perl Makefile.PL make test
This will run several tests. If all tests succeed, you are good to go!