Sentiment Classification using WSD, Maximum Entropy & Naive Bayes Classifiers

Overview

Citations

This library is sited here.

http://www.aclweb.org/anthology/W14-2708

iPhone App for Twitter Sentiments is Out

https://itunes.apple.com/us/app/emotion-calculator-for-twitter/id591404584?ls=1&mt=8

App no longer available. Sorry Due to lack of funds to run a seperate server App has been taken out of the app store. Use it free to build your own app tho

Sentiment Classification using WSD, Maximum Entropy & Naive Bayes Classifiers

Overview

Sentiment Classifier using Word Sense Disambiguation using wordnet and word occurance statistics from movie review corpus nltk. For twitter sentiment analysis bigrams are used as features on Naive Bayes and Maximum Entropy Classifier from the twitter data. Classifies into positive and negative labels. Next is use senses instead of tokens from the respective data.


sentiment_classifier-0.5.tar.gz

Download Stats Provided by pypi-github-stats

Sentiment Classifiers and Data

The above online demo uses movie review corpus from nltk, twitter and Amazon,on which Naive Bayes classifier is trained. Classifier using WSD SentiWordNet is based on heuristics and uses WordNet and SentiWordNet. Test results on sentiment analysis on twitter and amazon customer reviews data & features used for NaiveBayes will be Github.

Requirements

In Version 0.5 all the following requirements are installed automatically. In case of troubles install those manually.

How to Install

Shell command

python setup.py install

Documentation

Script Usage

Shell Commands:

senti_classifier -c file/with/review.txt

Python Usage

Shell Commands

cd sentiment_classifier/src/senti_classifier/
python senti_classifier.py -c reviews.txt

Library Usage

from senti_classifier import senti_classifier
sentences = ['The movie was the worst movie', 'It was the worst acting by the actors']
pos_score, neg_score = senti_classifier.polarity_scores(sentences)
print pos_score, neg_score

... 0.0 1.75
from senti_classifier.senti_classifier import synsets_scores
print synsets_scores['peaceful.a.01']['pos']

... 0.25

History

  • 0.7 Python 3.0 suport Thanks to @MrLokans
  • 0.6 Bug Fixed upon nltk upgrade
  • 0.5 No additional data required trained data is loaded automatically. Much faster/Optimized than previous versions.
  • 0.4 Added Bag of Words as a Feature as occurance statistics
  • 0.3 Sentiment Classifier First app, Using WSD module
Owner
Pulkit Kathuria
Pulkit Kathuria
Control the classic General Instrument SP0256-AL2 speech chip and AY-3-8910 sound generator with a Raspberry Pi and this Python library.

GI-Pi Control the classic General Instrument SP0256-AL2 speech chip and AY-3-8910 sound generator with a Raspberry Pi and this Python library. The SP0

Nick Bild 8 Dec 15, 2021
Code for the Python code smells video on the ArjanCodes channel.

7 Python code smells This repository contains the code for the Python code smells video on the ArjanCodes channel (watch the video here). The example

55 Dec 29, 2022
Correctly generate plurals, ordinals, indefinite articles; convert numbers to words

NAME inflect.py - Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words. SYNOPSIS import inflect p = in

Jason R. Coombs 762 Dec 29, 2022
Cherche (search in French) allows you to create a neural search pipeline using retrievers and pre-trained language models as rankers.

Cherche (search in French) allows you to create a neural search pipeline using retrievers and pre-trained language models as rankers. Cherche is meant to be used with small to medium sized corpora. C

Raphael Sourty 224 Nov 29, 2022
Python-zhuyin - An open source Python library that provides a unified interface for converting between Chinese pinyin and Zhuyin (bopomofo)

Python-zhuyin - An open source Python library that provides a unified interface for converting between Chinese pinyin and Zhuyin (bopomofo)

2 Dec 29, 2022
Mirco Ravanelli 2.3k Dec 27, 2022
Easy Language Model Pretraining leveraging Huggingface's Transformers and Datasets

Easy Language Model Pretraining leveraging Huggingface's Transformers and Datasets What is LASSL • How to Use What is LASSL LASSL은 LAnguage Semi-Super

LASSL: LAnguage Self-Supervised Learning 116 Dec 27, 2022
Demo programs for the Talking Head Anime from a Single Image 2: More Expressive project.

Demo Code for "Talking Head Anime from a Single Image 2: More Expressive" This repository contains demo programs for the Talking Head Anime

Pramook Khungurn 901 Jan 06, 2023
InferSent sentence embeddings

InferSent InferSent is a sentence embeddings method that provides semantic representations for English sentences. It is trained on natural language in

Facebook Research 2.2k Dec 27, 2022
Convolutional 2D Knowledge Graph Embeddings resources

ConvE Convolutional 2D Knowledge Graph Embeddings resources. Paper: Convolutional 2D Knowledge Graph Embeddings Used in the paper, but do not use thes

Tim Dettmers 586 Dec 24, 2022
Espresso: A Fast End-to-End Neural Speech Recognition Toolkit

Espresso Espresso is an open-source, modular, extensible end-to-end neural automatic speech recognition (ASR) toolkit based on the deep learning libra

Yiming Wang 919 Jan 03, 2023
Finding Label and Model Errors in Perception Data With Learned Observation Assertions

Finding Label and Model Errors in Perception Data With Learned Observation Assertions This is the project page for Finding Label and Model Errors in P

Stanford Future Data Systems 17 Oct 14, 2022
A minimal code for fairseq vq-wav2vec model inference.

vq-wav2vec inference A minimal code for fairseq vq-wav2vec model inference. Runs without installing the fairseq toolkit and its dependencies. Usage ex

Vladimir Larin 7 Nov 15, 2022
LightSeq: A High-Performance Inference Library for Sequence Processing and Generation

LightSeq is a high performance inference library for sequence processing and generation implemented in CUDA. It enables highly efficient computation of modern NLP models such as BERT, GPT2, Transform

Bytedance Inc. 2.5k Jan 03, 2023
Sentiment-Analysis and EDA on the IMDB Movie Review Dataset

Sentiment-Analysis and EDA on the IMDB Movie Review Dataset The main part of the work focuses on the exploration and study of different approaches whi

Nikolas Petrou 1 Jan 12, 2022
Repository to hold code for the cap-bot varient that is being presented at the SIIC Defence Hackathon 2021.

capbot-siic Repository to hold code for the cap-bot varient that is being presented at the SIIC Defence Hackathon 2021. Problem Inspiration A plethora

Aryan Kargwal 19 Feb 17, 2022
Machine learning models from Singapore's NLP research community

SG-NLP Machine learning models from Singapore's natural language processing (NLP) research community. sgnlp is a Python package that allows you to eas

AI Singapore | AI Makerspace 21 Dec 17, 2022
Training RNNs as Fast as CNNs

News SRU++, a new SRU variant, is released. [tech report] [blog] The experimental code and SRU++ implementation are available on the dev branch which

Tao Lei 14 Dec 12, 2022
vits chinese, tts chinese, tts mandarin

vits chinese, tts chinese, tts mandarin 史上训练最简单,音质最好的语音合成系统

AmorTX 12 Dec 14, 2022
Backend for the Autocomplete platform. An AI assisted coding platform.

Introduction A custom predictor allows you to deploy your own prediction implementation, useful when the existing serving implementations don't fit yo

Tatenda Christopher Chinyamakobvu 1 Jan 31, 2022