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

Fixed an error in the WSJ train/dev sections split

Resolved a clash in lexicon naming by adding the parser view (also removed the "lexicon." prefix)
parent ddef851d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ import edu.illinois.cs.cogcomp.core.stats.Counter;
import edu.illinois.cs.cogcomp.core.utilities.commands.CommandDescription;
import edu.illinois.cs.cogcomp.core.utilities.commands.CommandIgnore;
import edu.illinois.cs.cogcomp.core.utilities.commands.InteractiveShell;
import edu.illinois.cs.cogcomp.edison.annotators.HeadFinderDependencyViewGenerator;
import edu.illinois.cs.cogcomp.edison.data.ColumnFormatWriter;
import edu.illinois.cs.cogcomp.edison.data.IResetableIterator;
import edu.illinois.cs.cogcomp.edison.sentences.PredicateArgumentView;
......@@ -123,7 +122,7 @@ public class Main {
log.info("Caching NomBank data");
cacheVerbNom(SRLType.Nom);
log.info("Cahced all datasets");
log.info("Cached all datasets");
log.info("Adding required views in PTB");
addRequiredViews(SentenceDBHandler.instance.getDataset(Dataset.PTBAll));
......
......@@ -81,15 +81,13 @@ public class SRLProperties {
return wordNetFile;
}
String getFeatureCacheFile(SRLType SRLType, Models type, String featureSet,
String parser, Dataset dataset) {
String getFeatureCacheFile(SRLType SRLType, Models type, String featureSet, String parser, Dataset dataset) {
return this.config.getString("CacheDirectory") + "/features."
+ SRLType.name() + "." + type.name() + "." + featureSet + "."
+ dataset + "." + parser + ".cache";
}
String getPrunedFeatureCacheFile(SRLType SRLType, Models type,
String featureSet, String parser) {
String getPrunedFeatureCacheFile(SRLType SRLType, Models type, String featureSet, String parser) {
return this.config.getString("CacheDirectory") + "/features."
+ SRLType.name() + "." + type.name() + "." + featureSet + "."
+ parser + ".pruned.cache";
......@@ -102,7 +100,7 @@ public class SRLProperties {
public String[] getAllTrainSections() {
return new String[] { "02", "03", "04", "05", "06", "07", "08", "09",
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
"20", "21", "22", "24" };
"20", "21", "22" };
}
public String getTestSections() {
......@@ -119,7 +117,7 @@ public class SRLProperties {
public String[] getTrainDevSections() {
return new String[] { "02", "03", "04", "05", "06", "07", "08",
"09", "10", "11", "12", "13", "14", "15", "16", "17", "18",
"19", "20", "21", "22" };
"19", "20", "21", "22", "24" };
}
public String[] getDevSections() {
......
......@@ -61,7 +61,7 @@ public abstract class SRLManager {
private final HashMap<String, Integer> argToId, senseToId;
private final Set<String> allArgumentsSet, allSensesSet;
private final Set<String> allArgumentsSet;
private final LegalArguments knownLegalArguments;
private final Map<String, Set<String>> legalArgumentsCache;
......@@ -82,16 +82,11 @@ public abstract class SRLManager {
initializeFeatureManifest(defaultParser);
allArgumentsSet = Collections.unmodifiableSet(new TreeSet<String>(
Arrays.asList(getArgumentLabels())));
allSensesSet = Collections.unmodifiableSet(new TreeSet<String>(Arrays
.asList(getSenseLabels())));
allArgumentsSet = Collections.unmodifiableSet(new TreeSet<String>(Arrays.asList(getArgumentLabels())));
senseToId = getLabelIdMap(getSenseLabels());
argToId = getLabelIdMap(getArgumentLabels());
this.knownLegalArguments = new LegalArguments(getSRLType()
+ ".legal.arguments");
this.knownLegalArguments = new LegalArguments(getSRLType() + ".legal.arguments");
this.legalArgumentsCache = new ConcurrentHashMap<String, Set<String>>();
......@@ -197,10 +192,6 @@ public abstract class SRLManager {
return allArgumentsSet;
}
public Set<String> getAllSenses() {
return allSensesSet;
}
public void addConstraint(SRLConstraints c) {
this.constraints.add(c);
}
......@@ -381,7 +372,7 @@ public abstract class SRLManager {
* The name of the file that contains the lexicon
*/
public String getLexiconFileName(Models m) {
return properties.getModelsDir() + "/lexicon." + getSRLType() + "." + m + ".lex";
return properties.getModelsDir() + "/" + getSRLType() + "." + m + "." + defaultParser + ".lex";
}
/**
......
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