forked from gregdurrett/berkeley-doc-summarizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-summarizer.sh
executable file
·29 lines (24 loc) · 1.47 KB
/
run-summarizer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
jarpath="berkeley-doc-summarizer-assembly-1.jar"
echo "Running with jar located at $jarpath"
echo "If the assembled project jar isn't located here, edit run-summarizer.sh to point to the correct location"
# Extracts the existing java library path
java_lib_path=$(java -cp $jarpath edu.berkeley.nlp.summ.GLPKTest noglpk | head -1)
java_lib_path="$java_lib_path:/usr/local/lib/jni"
echo "Using the following library path: $java_lib_path"
if [ -d "test-summaries-extractive" ]; then
rm -rf test-summaries-extractive
fi
mkdir test-summaries-extractive/
# See edu.berkeley.nlp.summ.Summarizer for additional command line arguments
java -ea -server -Xmx3g -Djava.library.path=$java_lib_path -cp $jarpath edu.berkeley.nlp.summ.Summarizer -inputDir "test/" -outputDir "test-summaries-extractive/" -modelPath "models/summarizer-extractive.ser.gz" -noRst
if [ -d "test-summaries-extractive-compressive" ]; then
rm -rf test-summaries-extractive-compressive
fi
mkdir test-summaries-extractive-compressive
java -ea -server -Xmx3g -Djava.library.path=$java_lib_path -cp $jarpath edu.berkeley.nlp.summ.Summarizer -inputDir "test/" -outputDir "test-summaries-extractive-compressive" -modelPath "models/summarizer-extractive-compressive.ser.gz"
if [ -d "test-summaries-full" ]; then
rm -rf test-summaries-full
fi
mkdir test-summaries-full/
java -ea -server -Xmx3g -Djava.library.path=$java_lib_path -cp $jarpath edu.berkeley.nlp.summ.Summarizer -inputDir "test/" -outputDir "test-summaries-full"