class WikipediaSentenceExtractor {

  private void extract(Language language, String xmlDumpPath, String outputFile) throws IOException, CompressorException {<FILL_FUNCTION_BODY>}

  private boolean skipSentence(String sentence) {
    return sentence.trim().length() == 0 || Character.isLowerCase(sentence.trim().charAt(0));
  }

  public static void main(String[] args) throws IOException, CompressorException {
    if (args.length != 3) {
      System.out.println("Usage: " + WikipediaSentenceExtractor.class.getSimpleName() + " <langCode> <wikipediaXmlDump> <output>");
      System.exit(1);
    }
    WikipediaSentenceExtractor extractor = new WikipediaSentenceExtractor();
    extractor.extract(Languages.getLanguageForShortCode(args[0]), args[1], args[2]);
  }
}

    try (FileInputStream fis = new FileInputStream(xmlDumpPath);
         BufferedInputStream bis = new BufferedInputStream(fis);
         FileWriter fw = new FileWriter(outputFile)) {
      InputStream input;
      if (xmlDumpPath.endsWith(".bz2")) {
        input = new CompressorStreamFactory().createCompressorInputStream(bis);
      } else if (xmlDumpPath.endsWith(".xml")) {
        input = bis;
      } else {
        throw new IllegalArgumentException("Unknown file name, expected '.xml' or '.bz2': " + xmlDumpPath);
      }
      int sentenceCount = 0;
      WikipediaSentenceSource source = new WikipediaSentenceSource(input, language);
      while (source.hasNext()) {
        String sentence = source.next().getText();
        if (skipSentence(sentence)) {
          continue;
        }
        //System.out.println(sentence);
        fw.write(sentence);
        fw.write('\n');
        sentenceCount++;
        if (sentenceCount % 1000 == 0) {
          System.err.println("Exporting sentence #" + sentenceCount + "...");
        }
      }
    }
  
<no_super_class>