class LuceneSimpleIndexCreator {

  private LuceneSimpleIndexCreator() {}

  public static void main(String[] args) throws IOException {<FILL_FUNCTION_BODY>}

  private static void addDoc(IndexWriter iw, String ngram, int count) throws IOException {
    Document document = new Document();
    document.add(new TextField("ngram", ngram, Field.Store.YES));
    document.add(new TextField("count", String.valueOf(count), Field.Store.YES));
    iw.addDocument(document);
  }

}

    IndexWriterConfig conf = new IndexWriterConfig(new KeywordAnalyzer());
    try (IndexWriter iw1 = new IndexWriter(FSDirectory.open(new File("/tmp/1grams").toPath()), conf)) {
      addDoc(iw1, "the", 55);
      addDoc(iw1, "nice", 10);
      addDoc(iw1, "building", 1);
      Document document = new Document();
      document.add(new TextField("totalTokenCount", String.valueOf(3), Field.Store.YES));
      iw1.addDocument(document);
    }
    IndexWriterConfig conf2 = new IndexWriterConfig(new KeywordAnalyzer());
    try (IndexWriter iw2 = new IndexWriter(FSDirectory.open(new File("/tmp/2grams").toPath()), conf2)) {
      addDoc(iw2, "the nice", 3);
      addDoc(iw2, "nice building", 2);
    }
    IndexWriterConfig conf3 = new IndexWriterConfig(new KeywordAnalyzer());
    try (IndexWriter iw3 = new IndexWriter(FSDirectory.open(new File("/tmp/3grams").toPath()), conf3)) {
      addDoc(iw3, "the nice building", 1);
    }
  
<no_super_class>