This example uses the model file sentimentmodel1.bin, output by the SentimentTrainer Example.
Input
- Input table: sentiment_extract_input, as in SentimentExtractor Example: InputModelFile ('dictionary'), AnalysisType ('document')
SQL Call
SELECT * FROM SentimentExtractor ( ON sentiment_extract_input USING TextColumn ('review') InputModelFile ('classification:sentimentmodel1.bin') AnalysisType ('document') Accumulate ('id') ) AS dt ORDER BY id;
Output
id out_polarity out_strength -- ------------ ------------ 1 POS 2 2 POS 2 3 POS 2 4 POS 2 5 POS 2 6 NEG 2 7 NEG 2 8 NEG 2 9 NEG 2 10 NEG 2
Download a zip file of all examples and a SQL script file that creates their input tables.