public void extractRules() throws IOException {
LogInfo.begin_track_printAll("Extracting substitution rules:");
int i = 0;
BufferedReader reader = IOUtils.getBufferedFileReader(opts.dataFile);
ParaphraseDataset dataset = Json.readValueHard(reader, ParaphraseDataset.class);
for(ParaphraseExample ex: dataset.paraphraseExamples("train")) {
extractRule(ex);
if(++i % 10000 == 0)
LogInfo.logs("Number of examples gone through: %s",i);
if(i>=opts.maxExamples)
break;