Coder Social home page Coder Social logo

solertis / sentiment-analysis-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from buptldy/sentiment-analysis

0.0 2.0 0.0 64.72 MB

Chinese Shopping Reviews sentiment analysis

Home Page: http://buptldy.github.io/2016/07/20/2016-07-20-sentiment%20analysis/

Python 100.00%

sentiment-analysis-1's Introduction

#环境要求

  • Unix/Linux系统
  • python 2.7
  • python包安装: keras,sklearn,gensim,jieba,h5py,numpy,pandas
sudo pip install -r requirements.txt

用法

使用SVM分类器进行情感分类:

python predict.py svm 这个手机质量很好,我很喜欢,不错不错

python predict.py svm 这书的印刷质量的太差了吧,还有缺页,以后再也不买了

使用LSTM进行情感分类:

python predict.py lstm 酒店的环境不错,空间挺大的
python predict.py lstm 电脑散热太差,偶尔还蓝屏,送货也太慢了吧

#程序

  • code/Sentiment_lstm.py 使用word2vec和LSTM训练和预测

  • code/Sentiment_svm.py 使用word2vec和svm训练和预测

  • predict.py 调用Sentiment_lstm.py及Sentiment_svm.py进行预测

#数据

  • ./data/ 原始数据文件夹

    • data/neg.xls 负样本原始数据
    • data/pos.xls 正样本原始数据
  • ./svm_data/ svm数据文件夹

    • ./svm_data/*.npy 处理后的训练数据和测试数据
    • ./svm_data/svm_model/ 保存训练好的svm模型
    • ./svm_data/w2v_model/ 保存训练好的word2vec模型
  • ./lstm_data/ lstm数据文件夹

    • ./lstm_data/Word2vec_model.pkl 保存训练好的word2vec模型
    • ./lstm_data/lstm.yml 保存训练网络的结构
    • ./lstm_data/lstm.h5 保存网络训练到的权重

#详细介绍

购物评论情感分析的实现

sentiment-analysis-1's People

Contributors

buptldy 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.