System.err.print("Initializing extractor...");
R2A2 extractor = new R2A2();
System.err.println("Done.");
System.err.print("Initializing confidence function...");
ConfidenceMetric scoreFunc = new ConfidenceMetric();
System.err.println("Done.");
System.err.print("Initializing NLP tools...");
ChunkedSentenceReader sentReader = DefaultObjects
.getDefaultSentenceReader(reader);
System.err.println("Done.");
for (ChunkedSentence sent : sentReader.getSentences()) {
sentenceCount++;
String sentString = sent.getTokensAsString();
System.out.println(String.format("sentence\t%s\t%s", sentenceCount,
sentString));
for (ChunkedBinaryExtraction extr : extractor.extract(sent)) {
double score = scoreFunc.getConf(extr);
String arg1 = extr.getArgument1().toString();
String rel = extr.getRelation().toString();
String arg2 = extr.getArgument2().toString();