<qiyuangong>819_Most_Common_Word_1.java
public String mostCommonWord(String paragraph, String[] banned) {
        paragraph += ".";

        Set<String> banset = new HashSet();
        for (String word: banned) banset.add(word);
        Map<String, Integer> count = new HashMap();

        String ans = "";
        int ansfreq = 0;

        StringBuilder word = new StringBuilder();
        for (char c: paragraph.toCharArray()) {
            if (Character.isLetter(c)) {
                word.append(Character.toLowerCase(c));
            } else if (word.length() > 0) {
                String finalword = word.toString();
                if (!banset.contains(finalword)) {
                    count.put(finalword, count.getOrDefault(finalword, 0) + 1);
                    if (count.get(finalword) > ansfreq) {
                        ans = finalword;
                        ansfreq = count.get(finalword);
                    }
                }
                word = new StringBuilder();
            }
        }
        return ans;
    }
public String var_0 ( String var_2 , String [ ] var_3 ) {
  var_2 += "." ;
  Set < String > var_7 = new HashSet ( ) ;
  for ( String var_8 : var_3 ) var_7 . add ( var_8 ) ;
  Map < String , Integer > var_13 = new HashMap ( ) ;
  String var_15 = "" ;
  int var_17 = 0 ;
  StringBuilder var_8 = new StringBuilder ( ) ;
  for ( char var_20 : var_2 . toCharArray ( ) ) {
    if ( Character . isLetter ( var_20 ) ) {
      var_8 . append ( Character . toLowerCase ( var_20 ) ) ;
    }
    else if ( var_8 . length ( ) > 0 ) {
      String var_27 = var_8 . toString ( ) ;
      if ( ! var_7 . contains ( var_27 ) ) {
        var_13 . put ( var_27 , var_13 . getOrDefault ( var_27 , 0 ) + 1 ) ;
        if ( var_13 . get ( var_27 ) > var_17 ) {
          var_15 = var_27 ;
          var_17 = var_13 . get ( var_27 ) ;
        }
      }
      var_8 = new StringBuilder ( ) ;
    }
  }
  return var_15 ;
}
