示例#1
0
  /** Write the frequency distributions to the corresponding n-gram files. */
  private void writeFrequencyDistributionsToNGramFiles(
      ConditionalFrequencyDistribution<Integer, String> cfd) throws IOException {
    for (int level : cfd.getConditions()) {

      if (!ngramWriters.containsKey(level)) {
        throw new IOException("No writer for ngram level " + level + " initialized.");
      }

      writeNGramFile(cfd, level);
    }
  }