use of edu.illinois.cs.cogcomp.comma.readers.PrettyCorpusReader in project cogcomp-nlp by CogComp.
the class ClassifierComparison method main.
public static void main(String[] args) throws Exception {
PrettyCorpusReader pcr = new PrettyCorpusReader(CommaProperties.getInstance().getCommaLabeledDataFile());
CommaParser parser = new CommaParser(pcr.getSentences(), Ordering.ORDERED, true);
System.out.println("GOLD GOLD");
localCVal(true, true, parser, 250, 0.003, 0, 2.0, false);
System.out.println("GOLD AUTO");
localCVal(true, false, parser, 200, 0.003, 0, 2.0, false);
System.out.println("AUTO AUTO");
localCVal(false, false, parser, 250, 0.003, 0, 3.5, false);
List<Classifier> lbjExtractors = new ArrayList<>();
lbjExtractors.add(new LocalCommaClassifier().getExtractor());
Classifier lbjLabeler = new LocalCommaClassifier().getLabeler();
System.out.println("STRUCTURED GOLD");
StructuredCommaClassifier goldStructured = new StructuredCommaClassifier(lbjExtractors, lbjLabeler);
structuredCVal(goldStructured, parser, true, false);
System.out.println("STRUCTURED AUTO");
StructuredCommaClassifier autoStructured = new StructuredCommaClassifier(lbjExtractors, lbjLabeler);
structuredCVal(autoStructured, parser, false, false);
System.out.println("BAYRAKTAR GOLD");
EvaluateDiscrete bayraktarGold = getBayraktarBaselinePerformance(parser, true);
bayraktarGold.printPerformance(System.out);
System.out.println("BAYRAKTAR AUTO");
EvaluateDiscrete bayraktarAuto = getBayraktarBaselinePerformance(parser, false);
bayraktarAuto.printPerformance(System.out);
reasonForBelievingThatStructuredIsPerformingWorseDueToOverfitting(parser, false);
printConstrainedClassifierPerformance(parser);
}
Aggregations