Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
software:rewsemvector [2010/10/31 12:46]
eapontep created
software:rewsemvector [2010/10/31 13:55]
eapontep
Line 1: Line 1:
-=== General ===+==== General ====
  
-=== Installation Instruction ===+==== Installation Instruction ====
  
-**  Please read point 2.6 Before starting with these instructions.+**  Please read the very last point before starting this tutorial.
  
-**  Before installing SemanticVectors you WILL need Lucene (a library for java to search text).+This is an installation tutorial for dolts like me, that means, I wrote it after fighting for hours with my lack of intelligence. I hope it help you to install SemanticVectors quickly. You might need several things before installing SV, in particular a java developer kit, a building tool (ant) and Lucene, a library to search text. Everything is documented in this tutorial.
  
-  -  Install Lucene: +== Install Lucene: == 
-    - You will need JDK and ANT: +   You will need JDK and ANT: 
-       JDK: Develpment environment for java  +     [[https://jdk6.dev.java.net/|JDK]]Development kit for java 
-       Ant: A build-tool for java, similar to make.  +     [[http://ant.apache.org/|Ant]]: A build-tool for java. Similar to make.  
-    -  You can download both from a repository: +  -  You can download both from a repository: <file bash>sudo apt-get install openjdk-6-jdk
- +
-<code> +
-sudo apt-get install openjdk-6-jdk+
 sudo apt-get install ant  sudo apt-get install ant 
 sudo apt-get install ant-doc sudo apt-get install ant-doc
-</code  +</file>  
-    -  If every thing worked out, you could test the following command on your terminal: +  -  You can test your installation with the the following command on your terminal: <file bash>ant -version</file>You should get something like<file bash>Apache Ant version 1.7.1 compiled on September 8 2010</file>
-<code> ant -version </code +
-<file> Apache Ant version 1.7.1 compiled on September 8 2010 </file> +
- +
   -  [[http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.apache.org//lucene/java/lucene-3.0.2.tar.gz|Dowload Lucene]]   -  [[http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.apache.org//lucene/java/lucene-3.0.2.tar.gz|Dowload Lucene]]
 +  -  Untar the gz file in your desired location.
 +  -  Go to the target directory.
 +  -  If every thing is allright (if ant is working properly), then run ant in the current directory; it would automatically detect build.xml. <file bash>ant </file> 
 +    -  You will need to set the appropiate CLASSPATH. CLASSPATH specify the location of Java libraries. To check up if the variable is declared in your system:<file bash> echo $CLASSPATH </file>
 +    -  Althought there are (supposedly) several methods to set CLASSPATH the only one which worked for me was the following: You will have to edit  //bashrc// <file bash>gedit .bashrc </file>
 +    -  At the end of the document add: <file bash>export {location of lucene}/lucene-3.0.2/lucene-demos-3.0.2.jar:{location of lucene}/lucene-3.0.2/lucene-core-3.0.2.jar"</file> in my case:<file bash> export CLASSPATH="/home/eduardo/programas/lucene/lucene-3.0.2/lucene-demos-3.0.2.jar:/home/eduardo/programas/lucene/lucene-3.0.2/lucene-core-3.0.2.jar" </file>
 +    -  Reboot your computer. Now Lucene should be working.
 +    -  In order to check if everything is all right you should do the following. 
 +      -  [[http://code.google.com/p/semanticvectors/downloads/detail?name=kjbible-corpus.tar.gz&can=2&q=|Download an example corpus]] 
 +      -  Untar the corpus in a desired location. Normally the directory will we: bible_chapters. Go to that directory and run the following command: <file bash>java org.apache.lucene.demo.IndexFiles {complete bible_chapters path} </file>
 +      - In my case:<file bash>java org.apache.lucene.demo.IndexFiles /home/eduardo/programas/SemanticVectors/bible_chapters </file>
 +      - If everything runs ok, you should be done. An index directory will be created in bible_chapters. You should be able to perform some simple test using the demo library included in lucene.
 +== Install SemanticVector==
 +  *  This is the binary installation method. You could actually built SemanticVector by downloading the appropriate file and using again ant. I don't recommend it.
 +  -  [[http://semanticvectors.googlecode.com/files/semanticvectors-1.8.jar|Dowload SemanticVector]] .jar file. 
 +  -  Move this file to the desire location
 +  -  Again open bashrc and add to CLASSPATH the desire file. In my case it looks like: <file bash>export CLASSPATH="/home/eduardo/programas/lucene/lucene-3.0.2/lucene-demos-3.0.2.jar:/home/eduardo/programas/lucene/lucene-3.0.2/lucene-core-3.0.2.jar:/home/eduardo/programas/SemanticVectors/semanticvectors-1.8.jar" </file>
 +  -  Reboot your Computer.
 +  -  By now every thing should be working. Go to the directory where you ran lucene. Run the following command: <file bash>java pitt.search.semanticvectors.BuildIndex {location in your computer}/bible_chapters/index/</file>
 +  -  Now you are ready to use SemanticVectors. In this point I realized that there is a (probably) very serious bug. Since lucene is constantly actualized and SV depends on Lucene, there are several compatibility issues between both. In particular, a class form Lucene has been deprecated in the last version. I checked in the official community and there are not answers to this issue, although others have reported the same problem. Maybe a I get some feedback regarding this problem. Otherwise an older version of the software will be necessary.
 + --- //[[eapontep@uos.de|Eduardo Aponte]] 2010/10/31 13:49//
  
-- Untar the gz file in your desired location. 
- 
- 1.4. Go to the directory 
- 
- 1.5. If every thing is allright (if ant is working properly), then run ant in the current directory; it would directly associate build.xml.  
- 
- 1.6. You will need to set the appropiate CLASSPATH. Classpath specify the location of Java libraries. To check up if the variable is declared in your system: 
- 
- echo $CLASSPATH 
- 
- 1.7. Althought there are (supposedly) several methods to set CLASSPATH the only one which worked for me was the following: You will have to edit the file bashrc 
-  
- 
-                            in the end of the document add: 
-  
- export {location of lucene}/lucene-3.0.2/lucene-demos-3.0.2.jar:{location of lucene}/lucene-3.0.2/lucene-core-3.0.2.jar" 
- 
-     in my case: 
- 
- export CLASSPATH="/home/eduardo/programas/lucene/lucene-3.0.2/lucene-demos-3.0.2.jar:/home/eduardo/programas/lucene/lucene-3.0.2/lucene-core-3.0.2.jar" 
- 
-     Reboot your computer. Now lucene should be working 
-  
- 1.8. In order to check if everything is allrigh you should do the following. Download an example corpus from: "http://code.google.com/p/semanticvectors/downloads/detail?name=kjbible-corpus.tar.gz&can=2&q=". Untar the corpus in a desired location. Normally the directory will we: bib_chapters. Go to that directory and run the following command 
- 
- java org.apache.lucene.demo.IndexFiles {comple location of lucene} 
-  
-                           In my case: 
- 
- java org.apache.lucene.demo.IndexFiles /home/eduardo/lucene-3.0.2 
- 
-    If everything runs without a problem you should be done. 
- 
- 2. Install SemanticVector: 
- 
- 2.1. Dowload SemanticVector from: http://semanticvectors.googlecode.com/files/semanticvectors-1.8.jar 
- 
- 2.2. Move this file to the desire location 
- 
- 2.3. Again open bashrc and to CLASSPATH the desire file. In my case: 
- 
- export CLASSPATH="/home/eduardo/programas/lucene/lucene-3.0.2/lucene-demos-3.0.2.jar:/home/eduardo/programas/lucene/lucene-3.0.2/lucene-core-3.0.2.jar:/home/eduardo/programas/SemanticVectors/semanticvectors-1.8.jar" 
- 
- 2.4. Reboot your Computer. 
- 
- 2.5. By now every thing should be working. Go to the directory where you have runned lucene. Run the following command 
- 
- java pitt.search.semanticvectors.BuildIndex /home/eduardo/programas/SemanticVectors/bible_chapters/index/ 
- 
- 2.6. Now you are ready to use SemanticVectors. However in this point I reallized that there is a (probably) very serious bug. Since lucene is constantly actualized and SV depends on Lucene, there are several compatibility issues between both. In particular, a class form Lucene has been deprecated in the last version. I cheched in the official community and there are not answers to this issue, althought others have reported the same problem. Maybe a I get some feedback regarding this problem. Otherwise an older version of the software would be necessary.