GithubHelp home page GithubHelp logo

awesome-archive / sentencesentimentclassifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liuhuanyong/sentencesentimentclassifier

0.0 2.0 0.0 65.1 MB

Sentiment Classifier base on traditional Maching learning methods, eg Bayes, SVM ,DecisionTree, KNN and Deeplearning method like MLP,CNN,RNN(LSTM). 基于机器学习与深度学习方法的情感分析算法实现与对比,包括决策树,贝叶斯,KNN, SVM ,MLP, CNN, LSTM实现

Python 100.00%

sentencesentimentclassifier's Introduction

LearningBasedSentiment

Sentiment Classifier based on traditional Maching learning methods, eg. Bayes, SVM ,DecisionTree, KNN and Deeplearning method like MLP, CNN, RNN(LSTM).

Requirements

All code in this project is implemented in Python3.6+.
And all the essential packages are listed in requirements.txt, you can install them by pip install -r requirements.txt -i https://pypi.douban.com/simple/
Anaconda or virtualenv + virtualenvwrapper are strongly recommended to manage your Python environments.

预处理

1、语料
电影评论,训练集合20000(正向10000,负向10000)
电影评论,测试集合20000(正向3000,负向3000)
2、语料处理
使用jieba进行分词
3、输入向量化
使用预先训练的wordvector.bin文件进行向量化
对于传统机器学习算法,要求输入的是N维向量, 采用句子向量求和平均
对于CNN,RNN深度学习算法,要求输入的是N*M维向量,分别对应查找并生成向量  

训练与对比(准确率)

Algorithm Accuracy
DecisionTree 0.6907302434144715
Bayes 0.7437479159719906
KNN (n=14)0.7909303101033678
SVM 0.8302767589196399
MLP (20epoches) 0.8359
CNN (20epoches) 0.8376
LSTM (20epoches) 0.8505

sentencesentimentclassifier's People

Contributors

liuhuanyong avatar lxw0109 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.