Skip to content
Snippets Groups Projects
Commit e94d6880 authored by Christos Christodoulopoulos's avatar Christos Christodoulopoulos
Browse files

Minor changes

Replaced console output with logger calls
Updated compileModelsToJar to accommodate both Stanford and Charniak
parent 7e0add5a
No related branches found
Tags v.5.0
No related merge requests found
......@@ -5,32 +5,32 @@ VERSION=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpress
tmpdir=tmp-Srl-verb-$RANDOM
rm -rdf $tmpdir
mkdir -p $tmpdir/models
rm -rdf ${tmpdir}
mkdir -p ${tmpdir}/models
cp ./models/Verb* $tmpdir/models
cp ./models/lexicon.Verb.* $tmpdir/models
cd $tmpdir
rm -rdf ../target/illinoisSRL-verb-models-$VERSION.jar
jar cf ../target/illinoisSRL-verb-models-$VERSION.jar models
cd ..
rm -rdf $tmpdir
for parser in STANFORD CHARNIAK; do
cp ./models/Verb*${parser}* ${tmpdir}/models
cd ${tmpdir}
rm -rdf ../target/illinois-srl-models-verb-${parser}-${VERSION}.jar
jar cf ../target/illinois-srl-models-verb-${parser}-${VERSION}.jar models
cd ..
rm ${tmpdir}/models/*
done
rm -rdf ${tmpdir}
tmpdir=tmp-Srl-nom-$RANDOM
rm -rdf $tmpdir
mkdir -p $tmpdir/models
cp ./models/Nom* $tmpdir/models
cp ./models/lexicon.Nom.* $tmpdir/models
cd $tmpdir
rm -rdf ../target/illinoisSRL-nom-models-$VERSION.jar
jar cf ../target/illinoisSRL-nom-models-$VERSION.jar models
cd ..
rm -rdf ${tmpdir}
mkdir -p ${tmpdir}/models
rm -rdf $tmpdir
for parser in STANFORD CHARNIAK; do
cp ./models/Nom*${parser}* ${tmpdir}/models
cd ${tmpdir}
rm -rdf ../target/illinois-srl-models-nom-${parser}-${VERSION}.jar
jar cf ../target/illinois-srl-models-nom-${parser}-${VERSION}.jar models
cd ..
rm ${tmpdir}/models/*
done
rm -rdf ${tmpdir}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<groupId>edu.illinois.cs.cogcomp</groupId>
<artifactId>illinois-srl</artifactId>
<packaging>jar</packaging>
<version>5.0-SNAPSHOT</version>
<version>5.0</version>
<url>http://cogcomp.cs.illinois.edu</url>
......@@ -27,13 +27,15 @@
<!--Include the pre-trained SRL models for running SemanticRoleLabeler-->
<!--<dependency>-->
<!--<groupId>edu.illinois.cs.cogcomp</groupId>-->
<!--<artifactId>illinoisSRL-verb-models</artifactId>-->
<!--<version>4.0.1</version>-->
<!--<artifactId>illinois-srl</artifactId>-->
<!--<classifier>models-verb-stanford</classifier>-->
<!--<version>5.0</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>edu.illinois.cs.cogcomp</groupId>-->
<!--<artifactId>illinoisSRL-nom-models</artifactId>-->
<!--<version>4.0.1</version>-->
<!--<artifactId>illinois-srl</artifactId>-->
<!--<classifier>models-nom-stanford</classifier>-->
<!--<version>5.0</version>-->
<!--</dependency>-->
<!--The Illinois pipeline can be used instead -->
......
......@@ -212,10 +212,10 @@ public class Main {
for (String s : newViews) addedViews.incrementCount(s);
}
count++;
if (count % 1000 == 0) System.out.println(count + " sentences done");
if (count % 1000 == 0) log.info(count + " sentences done");
}
System.out.println("New views: ");
for (String s : addedViews.items()) System.out.println(s + "\t" + addedViews.getCount(s));
log.info("New views: ");
for (String s : addedViews.items()) log.info(s + "\t" + addedViews.getCount(s));
}
@CommandIgnore
......@@ -236,7 +236,7 @@ public class Main {
@CommandDescription(description = "Pre-extracts the features for a specific model and SRL type. " +
"Run this before training",
usage = "preExtract [Verb | Nom | Prep] [Predicate | Sense | Identifier | Classifier]")
usage = "preExtract [Verb | Nom] [Predicate | Sense | Identifier | Classifier]")
public static void preExtract(String srlType_, String model) throws Exception {
SRLType srlType = SRLType.valueOf(srlType_);
SRLManager manager = getManager(srlType, true);
......@@ -419,7 +419,7 @@ public class Main {
manager.writeIdentifierScale(pair.getFirst(), pair.getSecond());
}
@CommandDescription(description = "Performs evaluation.", usage = "evaluate [Verb | Prep | Nom]")
@CommandDescription(description = "Performs evaluation.", usage = "evaluate [Verb | Nom]")
public static void evaluate(String srlType_) throws Exception {
SRLType srlType = SRLType.valueOf(srlType_);
SRLManager manager = getManager(srlType, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment