Installing RelEx

From OpenCog

(Redirected from RelEx Install)
Jump to: navigation, search

A simpler, easier-to-follow set of instructions can be found in the Installing RelEx for Noobs page. Use the instructions below only if you are unable to make progress with the simpler instructions!

The standalone procedure for installation of RelEx (without Opencog) is relatively complex due to a high number of dependencies.

Installation examples are provided for both an Ubuntu/Debian (e.g. 13.1) and a Red Hat (e.g. EL5/EL6) based linux operating system.


Ubuntu 13.1

The installation examples provided below are based on an Ubuntu 13.1 operating system.

1. Install Java Development Tools (openjdk)

	
sudo apt-get install openjdk-7-jdk
sudo apt-get install ant
sudo apt-get install libcommons-logging-java
sudo apt-get install gnu-getopt

2. Install Link Parser

	
tar -zxf link-grammar-4.8.6.tar.gz
cd link-grammar-4.8.6
mkdir build
cd build
./configure
make
sudo make install

3. Install WordNet

	
sudo apt-get install wordnet
sudo apt-get install wordnet-dev
sudo apt-get install wordnet-sense-index

4. Install JWNL Java wordnet library (download: http://sourceforge.net/projects/jwordnet/)

unzip jwnl14-rc2.zip
cd jwnl14-rc2
sudo cp jwnl.jar /usr/share/java/		[see relex-1.5.0/build.xml for location]
sudo mkdir /usr/local/share/java/
sudo cp jwnl.jar /usr/local/share/java/		[see relex-1.5.0/batch-process.sh for location]
sudo chmod 777 /usr/share/java/jwnl.jar
sudo chmod 777 /usr/local/share/java/jwnl.jar


5. Install opennlp (optional) (download: http://sourceforge.net/projects/opennlp/)

		
tar -xvf opennlp-tools-1.5.0.tgz
cd opennlp-tools-1.5.0
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
./build.sh
sudo cp output/opennlp-tools-1.5.0.jar /usr/local/share/java/
sudo cp lib/maxent-2.5.2.jar /usr/local/share/java/
sudo cp lib/trove.jar /usr/local/share/java/

6. Install RelEx (download: https://launchpad.net/relex/+download)

tar -xvf relex-1.5.0.tar.gz
cd relex-1.5.0
ant
./batch-process.sh

7. Configure relex xml files for wordnet

		
cd relex-1.5.0/data/wordnet	[see relex/batch-process.sh for location]
gedit file_properties.xml
verify dictionary_path as <param name="dictionary_path" value="/usr/share/wordnet"/>	
[see WordNet compilation output for location]

Redhat EL5/EL6

The installation examples provided below are based on an EL5/EL6 operating system with development libraries installed.

1. Install Java Development Tools (eg openjdk and openjdk-devel)

	
yum install java-1.6.0-openjdk-devel
yum install java-1.6.0-openjdk
yum install ant
yum install ant-commons-logging

2. Install Java GNU getopt options tool (download: http://download.java.net/maven/2/gnu/getopt/java-getopt/1.0.13/)

unzip getopt.jar.zip
cd getopt.jar.zip_FILES
su root
cp getopt.jar /usr/share/java/gnu-getopt.jar


3. Install Link Parser (download: http://www.abisource.com/projects/link-grammar/#download)

	
tar -xvf link-grammar-4.8.6.tar.gz
cd link-grammar-4.8.6
./configure
make
su root
make install


4. Install WordNet

	
yum install wordnet
yum install wordnet-devel

5. Install JWNL Java wordnet library (download: http://sourceforge.net/projects/jwordnet/)

unzip jwnl14-rc2.zip
cd jwnl14-rc2
su root
cp jwnl.jar /usr/share/java/		[see relex-1.3.0/build.xml for location]
cp jwnl.jar /usr/local/share/java/	[see relex-1.3.0/batch-process.sh for location]
chmod 644 /usr/share/java/jwnl.jar


6. Install opennlp (optional) (download: http://sourceforge.net/projects/opennlp/)

		
tar -xvf opennlp-tools-1.5.3.tgz
cd opennlp-tools-1.5.3
su root
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
./build.sh
cp output/opennlp-tools-1.5.3.jar /usr/local/share/java/

7. Install RelEx (download: https://launchpad.net/relex/+download)

tar -xvf relex-1.5.0.tar.gz
cd relex-1.5.0
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
ant
./batch-process.sh


8. Configure relex xml files for wordnet

		
cd relex-1.5.0/data/wordnet	[see relex/batch-process.sh for location]
gedit file_properties.xml
change dictionary_path to <param name="dictionary_path" value="/usr/share/wordnet-3.0/dict"/>	
[see WordNet compilation output for location]