class GermanCaseAmbiguityFinder {

  private static final String NGRAMS = "/home/dnaber/data/google-ngram-index/de";

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

}

    LuceneLanguageModel lm = new LuceneLanguageModel(new File(NGRAMS));
    Dictionary dictionary = Dictionary.read(JLanguageTool.getDataBroker().getFromResourceDirAsUrl("/de/german.dict"));
    DictionaryLookup dl = new DictionaryLookup(dictionary);
    Map<String,String> lc = new HashMap<>();
    Map<String,String> uc = new HashMap<>();
    System.out.println("Iterating...");
    for (WordData wd : dl) {
      String word = wd.getWord().toString();
      String base = wd.getStem().toString();
      if (startsWithLowercase(word) && startsWithUppercase(base) || startsWithUppercase(word) && startsWithLowercase(base)) {
        // e.g. "Feilbieten"
        continue;
      }
      String tag = wd.getTag().toString();
      if (tag.endsWith(":INF") || tag.endsWith(":ADJ")) {
        // "Das Laufen" etc.
        continue;
      }
      if (!tag.startsWith("VER:") && !tag.startsWith("SUB:")) {
        continue;
      }
      if (startsWithUppercase(word)) {
        uc.put(word, tag);
      } else if (startsWithLowercase(word)) {
        lc.put(word, tag);
      }
    }
    System.out.println("Done. lc=" + lc.size() + ", uc=" + uc.size());
    for (Map.Entry<String, String> entry : uc.entrySet()) {
      String key = lowercaseFirstChar(entry.getKey());
      if (lc.containsKey(key)) {
        //System.out.println(entry.getKey() + " " + entry.getValue() + " " + lc.get(key));
        long lcCount = lm.getCount(lowercaseFirstChar(entry.getKey()));
        long ucCount = lm.getCount(uppercaseFirstChar(entry.getKey()));
        long sum = lcCount + ucCount;
        System.out.println(sum + "\t" + lcCount + "\t" + ucCount + "\t" + entry.getKey());
      }
    }
  
<no_super_class>