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

Added an option for max inference rounds

-Only works with the Lagrange inference solver for now
parent 80fd99e3
No related branches found
No related tags found
No related merge requests found
......@@ -37,3 +37,5 @@ ModelsDirectory = models
# Directory to output gold and predicted files for manual comparison
# Comment out for no output
OutputDirectory = srl-out
MaxInferenceRounds = 200
\ 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.1.1</version>
<version>5.1.2</version>
<url>http://cogcomp.cs.illinois.edu</url>
......
......@@ -19,7 +19,7 @@ public class SRLProperties {
private static SRLProperties theInstance;
private PropertiesConfiguration config;
private final String curatorHost;
private final int curatorPort;
private final int curatorPort, maxInferenceRounds;
private final String wordNetFile;
private SRLProperties(URL url) throws ConfigurationException {
......@@ -34,6 +34,8 @@ public class SRLProperties {
&& config.getBoolean("LoadWordNetConfigFromClassPath")) {
WordNetManager.loadConfigAsClasspathResource(true);
}
maxInferenceRounds = config.getInt("MaxInferenceRounds");
}
public static void initialize(String configFile) throws Exception {
......@@ -164,4 +166,8 @@ public class SRLProperties {
public int getCuratorPort() {
return curatorPort;
}
public int getMaxInferenceRounds() {
return maxInferenceRounds;
}
}
......@@ -139,7 +139,7 @@ public class SemanticRoleLabeler {
if (predicates.isEmpty()) return null;
ISRLInference inference = new SRLLagrangeInference(manager, ta, predicates, true, 100);
ISRLInference inference = new SRLLagrangeInference(manager, ta, predicates, true, properties.getMaxInferenceRounds());
return inference.getOutputView();
}
......
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