Icon

02_​Sentiment_​Analysis_​JSON_​Input

Sentiment Analysis: JSON Input

This workflow showcases how the Container Input (JSON) and Container Output (JSON) nodes can be used to create a REST API for a workflow that can then be deployed as inference workflow to KNIME Edge. The workflow can be called via REST and classifies multiple reviews as positive or negative.

When deployed to KNIME Edge, a POST request with the following JSON body can be used for testing:

{
"content": [
"What a crappy flight, I hated it! It was the worst experience ever",
"What a lovely flight! I had the best time!!!"
]
}

The response will be:

[
{
"Prediction (Document class) (Confidence)": 0.7526856112217033,
"Prediction (Sentiment)": "Negative"
},
{
"Prediction (Document class) (Confidence)": 0.716930368994336,
"Prediction (Sentiment)": "Positive"
}
]

Prediction/Inferencing REST API REST Response REST API for Sentiment AnalysisThis workflow showcases how the Container Input (JSON) and Container Output (JSON)nodes can be used to create a REST API for a workflow that can then be deployed asinference workflow to KNIME Edge. The workflow can be called via REST and classifiesmultiple reviews as positive or negative.See the workflow description for example requests and responses. Read Trained ML ModelExtract recomended label Create term vector of the test set with identicalfeature space of thetraining setAssigning text to predicted classesInput one or morecomments as JSONOutput prediction andconfidenceRead Document Vector Model Reader Category To Class DocumentVector Applier Rule Engine ContainerInput (JSON) ContainerOutput (JSON) Preprocessing Postprocessing Model Reader Gradient BoostedTrees Predictor Prediction/Inferencing REST API REST Response REST API for Sentiment AnalysisThis workflow showcases how the Container Input (JSON) and Container Output (JSON)nodes can be used to create a REST API for a workflow that can then be deployed asinference workflow to KNIME Edge. The workflow can be called via REST and classifiesmultiple reviews as positive or negative.See the workflow description for example requests and responses. Read Trained ML ModelExtract recomended label Create term vector of the test set with identicalfeature space of thetraining setAssigning text to predicted classesInput one or morecomments as JSONOutput prediction andconfidenceRead Document Vector Model Reader Category To Class DocumentVector Applier Rule Engine ContainerInput (JSON) ContainerOutput (JSON) Preprocessing Postprocessing Model Reader Gradient BoostedTrees Predictor

Nodes

Extensions

Links