String trainFileString; Reader reader; Instances instances; Tertius tertius = new Tertius(); StringBuffer text = new StringBuffer();  try {  text.append("\n\nTertius options:\n\n"); text.append("-t <name of training file>\n"); text.append("\tSet training file.\n"); Enumeration enu = tertius.listOptions(); while (enu.hasMoreElements()) { Option option = (Option) enu.nextElement(); text.append(option.synopsis() + "\n"); text.append(option.description() + "\n"); }   trainFileString = Utils.getOption('t', args); if (trainFileString.length() == 0) { throw new Exception("No training file given!"); } try { reader = new BufferedReader(new FileReader(trainFileString)); } catch (Exception e) { throw new Exception("Can't open file " + e.getMessage() + "."); }  instances = new Instances(reader);   tertius.setOptions(args); Utils.checkForRemainingOptions(args);   tertius.buildAssociations(instances); System.out.println(tertius);  } catch (Exception e) { System.err.println("\nWeka exception: " + e.getMessage() + text); }
runAssociator(new Tertius(), args);
  public static void main(String [] args) {    String trainFileString;    Reader reader;    Instances instances;    Tertius tertius = new Tertius();    StringBuffer text = new StringBuffer();    try {      /* Help string giving all the command line options. */      text.append("\n\nTertius options:\n\n");      text.append("-t <name of training file>\n");      text.append("\tSet training file.\n");      Enumeration enu = tertius.listOptions();      while (enu.hasMoreElements()) {	Option option = (Option) enu.nextElement();	text.append(option.synopsis() + "\n");	text.append(option.description() + "\n");      }      /* Training file. */      trainFileString = Utils.getOption('t', args);      if (trainFileString.length() == 0) {	throw new Exception("No training file given!");      }      try {	reader = new BufferedReader(new FileReader(trainFileString));      } catch (Exception e) {	throw new Exception("Can't open file " + e.getMessage() + ".");      }      instances = new Instances(reader);      /* Tertius options. */      tertius.setOptions(args);      Utils.checkForRemainingOptions(args);      /* Build the rules and output the results. */      tertius.buildAssociations(instances);      System.out.println(tertius);    } catch (Exception e) {      System.err.println("\nWeka exception: " + e.getMessage() + text);    }  }