use of edu.stanford.nlp.coref.CorefProperties.Dataset in project CoreNLP by stanfordnlp.
the class FastNeuralCorefDataExporter method main.
public static void main(String[] args) throws Exception {
Properties props = StringUtils.argsToProperties(args);
props.setProperty("coref.maxMentionDistance", "50");
props.setProperty("coref.maxMentionDistanceWithStringMatch", "1000");
props.setProperty("coref.conllOutputPath", "/Users/kevinclark/Programming/research/coref/conll-2012/output");
props.setProperty("coref.data", "/Users/kevinclark/Programming/research/coref/conll-2012");
props.setProperty("coref.scorer", "/Users/kevinclark/Programming/research/coref/conll-2012/scorer/v8.01/scorer.pl");
Dictionaries dictionaries = new Dictionaries(props);
String outputPath = "/Users/kevinclark/Programming/research/coref/data";
String dataPath = outputPath + "/raw/";
String goldClusterPath = outputPath + "/gold/";
String compressorPath = outputPath + "/";
IOUtils.ensureDir(new File(outputPath));
IOUtils.ensureDir(new File(dataPath));
IOUtils.ensureDir(new File(goldClusterPath));
IOUtils.ensureDir(new File(compressorPath));
Compressor<String> compressor = new Compressor<String>();
for (Dataset dataset : Arrays.asList(Dataset.TRAIN, Dataset.DEV, Dataset.TEST)) {
CorefProperties.setInput(props, dataset);
System.out.println(CorefProperties.getInputPath(props));
new FastNeuralCorefDataExporter(props, dictionaries, compressor, dataPath + dataset.toString().toLowerCase(), goldClusterPath + dataset.toString().toLowerCase()).run(props, dictionaries);
}
writeCompressor(compressor, compressorPath + "/compression");
}
Aggregations