public void buildClassifier(Instances data) throws Exception 
  {
    // can classifier handle the data?
    getCapabilities().testWithFail(data);

    data = new Instances(data);
    numExamples = data.numInstances();
    Enumeration e = data.enumerateInstances();

    // Checks on data not implemented.

    // reset random generator to produce the same results each time
    rand = new Random(0);
    // Options
    if(print_msg)
      System.out.println("Resolution mode: " + m_resolutionMode);
    if(print_msg)
      System.out.println("Classification: " + m_classificationMode);
    if(print_msg)
      System.out.println("Rule size: " + upperBaseLimit);

    // initialize rules set.
    olmrules = new OLMRules();
    int i = 0;
    // fill in rules.
    if(print_msg)
      System.out.println("Printing Rule Process");
    while(e.hasMoreElements())
    {
      Instance ins = (Instance)e.nextElement();
      if(print_msg)
        System.out.println("Trying to add (" +
            ins.toString() + ") Rule");
      olmrules.addRule(ins); 
      if(print_msg)
        System.out.println("Result:");
      if(print_msg)
        olmrules.printRules();
      i++;

      // System.out.println("Added rule " + i);
    }
    //System.out.println("Rule set built!!");

    // print rule set:

  }