code: private BigInteger hash(String word) {
          if (word == null || word.length() == 0) {
              return new BigInteger("0");
          }
          char[] charArray = word.toCharArray();
          BigInteger x = BigInteger.valueOf(((long) charArray[0]) << 7);
          BigInteger m = new BigInteger("1000003");
          BigInteger mask = new BigInteger("2").pow(hashBitCount).subtract(new BigInteger("1"));
          long sum = 0;
          for (char c : charArray) {
              sum += c;
          }
          x = x.multiply(m).xor(BigInteger.valueOf(sum)).and(mask);
          x = x.xor(new BigInteger(String.valueOf(word.length())));
          if (x.equals(new BigInteger("-1"))) {
              x = new BigInteger("-2");
          }
          return x;
      }
docs: 计算词的哈希值
  @param word 词
  @return 哈希值