class SentenceSplitter {

  private static final int BATCH_SIZE = 1000;

  private void run(Language language, File inputFile, PrintWriter outputFile) throws IOException {<FILL_FUNCTION_BODY>}

  public static void main(String[] args) throws IOException {
    if (args.length != 3) {
      System.err.println(
          "Usage: " + SentenceSplitter.class.getSimpleName() + " <langCode> <inputFile or folderFile> <outputFile>");
      System.exit(1);
    }
    SentenceSplitter splitter = new SentenceSplitter();
    PrintWriter output = new PrintWriter(args[2]);
    File folder = new File(args[1]);
    if (folder.isFile()) {
      splitter.run(Languages.getLanguageForShortCode(args[0]), folder, output);
    }
    if (folder.isDirectory()) {
      for (final File fileEntry : folder.listFiles()) {
        if (fileEntry.isFile()) {
          splitter.run(Languages.getLanguageForShortCode(args[0]), fileEntry, output);
        }
      }
    }
    output.close();
  }
}

    JLanguageTool lt = new JLanguageTool(language);
    try (Scanner scanner = new Scanner(inputFile)) {
      int count = 0;
      long startTime = System.currentTimeMillis();
      while (scanner.hasNextLine()) {
        String line = scanner.nextLine();
        List<String> sentences = lt.sentenceTokenize(line);
        for (String sentence : sentences) {
          String cleanSentence = sentence.trim();
          if (!cleanSentence.isEmpty()) {
            outputFile.println(cleanSentence);
          }
        }
        if (++count % BATCH_SIZE == 0) {
          long time = System.currentTimeMillis() - startTime;
          System.out.println(count + ". " + time + "ms per " + BATCH_SIZE + " sentences");
          startTime = System.currentTimeMillis();
        }
      }
    }
  
<no_super_class>