<qiyuangong>804_Unique_Morse_Code_Words_1.java
public int uniqueMorseRepresentations(String[] words) {
        String[] MORSE = new String[]{".-","-...","-.-.","-..",".","..-.","--.",
                         "....","..",".---","-.-",".-..","--","-.",
                         "---",".--.","--.-",".-.","...","-","..-",
                         "...-",".--","-..-","-.--","--.."};

        Set<String> seen = new HashSet();
        for (String word: words) {
            StringBuilder code = new StringBuilder();
            for (char c: word.toCharArray())
                code.append(MORSE[c - 'a']);
            seen.add(code.toString());
        }

        return seen.size();
    }
public int sample_funcname ( String [ ] var_1 ) {
  String [ ] var_28 = new String [ ] {
    ".-" , "-..." , "-.-." , "-.." , "." , "..-." , "--." , "...." , ".." , ".---" , "-.-" , ".-.." , "--" , "-." , "---" , ".--." , "--.-" , ".-." , "..." , "-" , "..-" , "...-" , ".--" , "-..-" , "-.--" , "--.." };
    Set < String > var_31 = new HashSet ( ) ;
    for ( String var_32 : var_1 ) {
      StringBuilder var_34 = new StringBuilder ( ) ;
      for ( char var_36 : var_32 . toCharArray ( ) ) var_34 . append ( var_28 [ var_36 - 'a' ] ) ;
      var_31 . add ( var_34 . toString ( ) ) ;
    }
    return var_31 . size ( ) ;
  }
  