Python NLTK Sentiment Analysis with Text Classification Demo

3 Pages • 363 Words • PDF • 213 KB
Uploaded at 2021-09-24 12:36

This document was submitted by our user and they confirm that they have the consent to share it. Assuming that you are writer or own the copyright of this document, report to us by using this DMCA report button.


11/27/2018

Python NLTK Sentiment Analysis with Text Classification Demo

Home NLTK Demos NLP APIs Contact StreamHacker Blog Follow Jacob on twitter

Sentiment Analysis with Python NLTK Text Classification This is a demonstration of sentiment analysis using a NLTK 2.0.4 powered text classification process. It can tell you whether it thinks the text you enter below expresses positive sentiment, negative sentiment, or if it's neutral. Using hierarchical classification, neutrality is determined first, and sentiment polarity is determined second, but only if the text is not neutral. Analyze Sentiment Language english

Enter text great movie

Enter up to 50000 characters Analyze

Sentiment Analysis Results The text is pos. The final sentiment is determined by looking at the classification probabilities below. Subjectivity neutral: 0.1 polar: 0.9

https://text-processing.com/demo/sentiment/

1/3

11/27/2018

Python NLTK Sentiment Analysis with Text Classification Demo

Polarity pos: 0.7 neg: 0.3

How Sentiment Analysis with Text Classification Works The english sentiment uses classifiers trained on both twitter sentiment as well as movie reviews from the data sets created by Bo Pang and Lillian Lee(http://www.cs.cornell.edu/people/pabo/movie-review-data/) using nltk-trainer(http://github.com/japerk/nltk-trainer) (also on bitbucket(http://bitbucket.org/japerk/nltktrainer/src) ). The dutch sentiment is based on book reviews. The results will be more accurate on text that is similar to original training data. If you get an odd result, it could be the words you've used are unrecognized. Try entering more words to improve accuracy. Sentiment Analysis Articles To read more about how it works, please read the following articles I've written about the process: 1. Training a naive bayes classifier for sentiment analysis using movie reviews(http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/) 2. Calculating high information words for sentiment analysis(http://streamhacker.com/2010/06/16/text-classification-sentiment-analysis-eliminate-lowinformation-features/)

Natural Language Sentiment Analysis API If you'd like to use this thru an API, please see the Sentiment Analysis API Docs. And for higher limits and premium API access, signup for the Mashape Text-Processing API.

Natural Language Processing Services Want to download/purchase any of these models? Need a custom model, trained on a public or custom corpus? Want help creating or bootstrapping a custom corpus? If you answered yes to any of these questions, please fill out this Natural Language Processing Services Survey(http://streamhacker.com/nltk-services/) .       Powered by NLTK.

https://text-processing.com/demo/sentiment/

2/3

11/27/2018

https://text-processing.com/demo/sentiment/

Python NLTK Sentiment Analysis with Text Classification Demo

3/3
Python NLTK Sentiment Analysis with Text Classification Demo

Related documents

16 Pages • 7,597 Words • PDF • 96.5 KB

7 Pages • 630 Words • PDF • 25.8 MB

513 Pages • 99,318 Words • PDF • 10.8 MB

362 Pages • 135,119 Words • PDF • 3.6 MB

13 Pages • 9,630 Words • PDF • 144.9 KB

658 Pages • 155,366 Words • PDF • 6 MB

5 Pages • 3,769 Words • PDF • 192.8 KB

2 Pages • PDF • 545.5 KB

128 Pages • 28,135 Words • PDF • 5.5 MB

228 Pages • 33,112 Words • PDF • 763.5 KB

193 Pages • 49,279 Words • PDF • 736.3 KB