code: protected static Map<Character, Integer> match_alphabet(String pattern) {
          Map<Character, Integer> s = new HashMap<Character, Integer>();
          char[] char_pattern = pattern.toCharArray();
          for (char c : char_pattern) {
              s.put(c, 0);
          }
          int i = 0;
          for (char c : char_pattern) {
              s.put(c, s.get(c) | (1 << (pattern.length() - i - 1)));
              i++;
          }
          return s;
      }
docs: Initialise the alphabet for the Bitap algorithm.
  
  @param pattern
  The text to encode.
  @return Hash of character locations.