code: public static byte[] calculate(final Analyzer analyzer, final String text)
              throws IOException {
          byte[] value = null;
          try (TokenStream stream = analyzer.tokenStream("minhash", text)) {
              final CharTermAttribute termAtt = stream
                      .addAttribute(CharTermAttribute.class);
              stream.reset();
              if (stream.incrementToken()) {
                  final String minhashValue = termAtt.toString();
                  value = BaseEncoding.base64().decode(minhashValue);
              }
              stream.end();
          }
          return value;
      }
docs: Calculates MinHash value.
  
  @param analyzer analyzer to parse a text
  @param text a target text
  @return MinHash value
  @throws IOException