-
Notifications
You must be signed in to change notification settings - Fork 205
How to install JoBimText
Vineet Kumar edited this page Mar 9, 2016
·
1 revision
NOTE:
- The installation is done in the home directory.
- Replace occurrences of {text} with appropriate text.
###1. Install jobimservice
-
Clone on your computer's home directory
cd ~
git clone https://github.com/{YOUR-USERNAME ON GITHUB}/jobimservice.git
- In “~/jobimservice/conf_mysql_wikipedia_stanford.xml” file, change the user from root to {user} as in user@localhost, and the mysql password from blank to {mysql-password}
###2. Install database
- Download files
cd ~
wget https://sourceforge.net/projects/jobimtext/files/jobimtext_pipeline_0.1.2.tar.gz -O - | tar -xz
cd ~/jobimtext_pipeline_0.1.2
mkdir wikipedia_stanford
cd ~/jobimtext_pipeline_0.1.2/wikipedia_stanford
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_BIM_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_filtered_g1.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_BIM_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_simsortlimit200.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_cluster_a1_N200_n200_labelled.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_cluster_alog_N200_n30_labelled.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_feature_count.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_filtered_g1.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_simsortlimit200.gz
wget https://sourceforge.net/projects/jobimtext/files/data/models/wikipedia_stanford/wikipedia_stanford_word_count.gz
gunzip *.gz
mv wikipedia_stanford_BIM_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_filtered_g1 wikipedia_stanford_BIM_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000
mv wikipedia_stanford_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_filtered_g1 wikipedia_stanford_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000
cp ~/jobimservice/wikipedia_stanford.sql ~/jobimtext_pipeline_0.1.2/wikipedia_stanford/.
- Compute Sense Clusters
cd ~/jobimtext_pipeline_0.1.2
java -cp lib/org.jobimtext-0.1.2.jar:lib/* org.jobimtext.sense.ComputeSenseClusters -N 200 -n 100 -mc 3 -ms 5 -mr 100 -i wikipedia_stanford/wikipedia_stanford_LMI_s0.0_w2_f2_wf0_wpfmax1000_wpfmin2_p1000_simsortlimit200 -o wikipedia_stanford/wikipedia_stanford_sense_cluster
###3. Install MariaDB (mysql), if not already installed ###4. Setup MariaDB
- Generate database
cd ~/jobimtext_pipeline_0.1.2
sudo mysql -u root -p
MariaDB [(none)]> source /home/{user}/jobimtext_pipeline_0.1.2/wikipedia_stanford/wikipedia_stanford.sql
- Create a new mysql user and password that is the same as that in the file ~/jobimservice/conf_mysql_wikipedia_stanford.xml, and Grant all privileges
MariaDB [DT_wikipedia_stanford]> CREATE USER '{user}'@'localhost' IDENTIFIED BY '{mysql-password}';
MariaDB [DT_wikipedia_stanford]> GRANT ALL PRIVILEGES ON * . * TO '{user}'@'localhost';
MariaDB [DT_wikipedia_stanford]> exit
- Test the mysql installation
mysql -u {user} -p
MariaDB [(none)]> use DT_wikipedia_stanford;
MariaDB [DT_wikipedia_stanford]> SELECT * FROM word_count limit 10;
The previous command shows the first 10 rows of word_count
MariaDB [DT_wikipedia_stanford]> exit
###5. Test the installation
- Run the service
cd ~/jobimservice
./gradlew runRestBackend
- Issue commands from Browser
http://localhost:8080/jbt/listBackends
mysql_wikipedia_stanford
web_wikipedia_trigram
http://localhost:8080/jbt/countTerm?term=exceptionally%23RB&backend=mysql_wikipedia_stanford
8999