This example uses the classification model file default_sentiment_classification_model.bin.
Input
- Input table: sentiment_extract_input, as in SentimentExtractor Example: InputModelFile ('dictionary'), AnalysisType ('document')
SQL Call
SELECT * FROM SentimentEvaluator ( ON SentimentExtractor ( ON sentiment_extract_input USING TextColumn ('review') Accumulate ('category') InputModelFile ('classification:default_sentiment_classification_model.bin') ) PARTITION BY 1 USING ObservationColumn ('category') SentimentColumn ('out_polarity') ) AS dt;
Output
evaluation_result --------------------------------------------------------------------------------- positive record (total relevant, relevant, total retrieved): 5 3 3 recall and precision: 0.60 1.00 negative record (total relevant, relevant, total retrieved): 5 5 7 recall and precision: 1.00 0.71 positive and negative record (total relevant, relevant, total retrieved): 10 8 10 recall and precision: 0.80 0.80
Download a zip file of all examples and a SQL script file that creates their input tables.