public static void main(String[] args) {
    AuToBI autobi = new AuToBI();
    autobi.init(args);

    List<FormattedFile> filenames;
    try {
      filenames = AuToBIReaderUtils.globFormattedFiles(autobi.getParameter("training_filenames"));
    } catch (AuToBIException e) {
      try {
        filenames = AuToBIReaderUtils.globFormattedFiles(autobi.getParameter("cprom_filenames"));
      } catch (AuToBIException e1) {
        AuToBIUtils.error("No training files specified with -training_filenames or -cprom_filenames");
        return;
      }
    }

    HashMap<String, AuToBITask> tasks = AuToBIUtils.createTaskListFromParameters(autobi.getParameters());

    for (String task_label : tasks.keySet()) {
      AuToBITask task = tasks.get(task_label);
      AuToBITrainer trainer = new AuToBITrainer(autobi);
      try {

        // Tone classification tasks ignore those points that do not have any associated prosodic event
        if (task_label.equals("phrase_accent_classifier")) {
          autobi.getParameters().setParameter("attribute_omit", "nominal_PitchAccentType:NOTONE");
        } else if (task_label.equals("phrase_accent_boundary_tone_classifier")) {
          autobi.getParameters().setParameter("attribute_omit", "nominal_PhraseAccentBoundaryTone:NOTONE");
        } else if (task_label.equals("phrase_accent_classifier")) {
          autobi.getParameters().setParameter("attribute_omit", "nominal_PhraseAccent:NOTONE");
        } else {
          autobi.getParameters().setParameter("attribute_omit", "");
        }
        trainer.trainClassifier(filenames, task.getFeatureSet(), task.getClassifier());
      } catch (Exception e) {
        AuToBIUtils.error("Error training classifier for " + task_label);
        continue;
      }

      String output_file;
      try {
        output_file = autobi.getParameter(task_label);
      } catch (AuToBIException e) {
        AuToBIUtils.error("Problem reading classifier filename parameter: " + e.getMessage());
        continue;
      }
      try {
        ClassifierUtils.writeAuToBIClassifier(output_file, task.getClassifier());
      } catch (IOException e) {
        AuToBIUtils.error("Could not write AuToBIClassifier: " + e.getMessage());
      }
    }
  }