public static AuToBIWordReader getAppropriateReader(FormattedFile file, AuToBIParameters params) {
    String filename = file.getFilename();
    AuToBIWordReader reader;
    switch (file.getFormat()) {
      case TEXTGRID:
        reader = new TextGridReader(filename, params.getOptionalParameter("words_tier_name"),
            params.getOptionalParameter("tones_tier_name"), params.getOptionalParameter("breaks_tier_name"),
            params.getOptionalParameter("charset"));

        break;
      case CPROM:
        reader = new CPromTextGridReader(filename, "words", "delivery", "UTF16", params.booleanParameter(
            "cprom_include_secondary", true));
        break;
      case BURNC:
        reader = new BURNCReader(filename.replace(".ala", ""));
        break;
      case SIMPLE_WORD:
        reader = new SimpleWordReader(filename);
        break;
      case SWB_NXT:
        reader = new SwitchboardNXTReader(filename.replace(".terminals.xml", ""));
        break;
      case BUCKEYE:
        reader = new BuckeyeReader(filename);
        break;
      case DUR:
        reader = new DURReader(filename);
        break;
      default:
        reader = new TextGridReader(filename);
    }
    return reader;
  }