@Override
    public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
                      ParseContext context) throws IOException, SAXException, TikaException {
        if (classifier == null) {
            LOG.warn(getClass().getSimpleName() + " is not configured properly.");
            return;
        }
        String inputString = IOUtils.toString(stream, "UTF-8");
        String sentiment = classifier.predict(inputString);
        metadata.add("Sentiment", sentiment);
    }
Performs the parse

@param stream   the input
@param handler  the content handler
@param metadata the metadata passed
@param context  the context for the parser
tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/sentiment/SentimentAnalysisParser.java