Giter VIP home page Giter VIP logo

sentiment-classification's Introduction

Sentiment-Classification

Bidirectional LSTM을 사용한 네이버 영화 리뷰 데이터 분류

1. 네이버 영화 리뷰 데이터

네이버에서 제공하는 영화 리뷰 데이터를 사용

학습 데이터 15만건과 테스트 데이터 5만건을 사용

데이터는 리뷰의 id, 리뷰 내용, 리뷰의 label(0: 부정, 1: 긍정)로 구성됨

데이터 제공

2. Konlpy의 Okt를 사용해 문장 품사 태깅

Konlpy.Okt의 pos 함수를 사용해 문장들을 품사 태깅함

okt_pos

문장들을 토큰화시킴 (단어/품사)

token

3. Gensim의 Word2Vec을 사용해 단어 임베딩

모든 학습 데이터 문장들을 토큰화하고 gensim의 word2vec을 사용해 사전을 만든 후에 학습 시킴

word2vec

4. Tensorflow로 Bidirectional LSTM을 만들어 문장 이진 분류(0 or 1)

board

test

5만건의 테스트 데이터에 대해서는 약 83%의 정확도를 기록함

5. 사용법

  1. python 라이브러리 설치

    pip install gensim
    pip install tensorflow
    pip install konlpy
  2. Word2Vec 학습

    python Word2vec_train.py
  3. 모델 학습

    python BiLSTM_train.py
  4. 모델 성능 검증

    python BiLSTM_test.py
  5. 모델 테스트

    python Test.py

sentiment-classification's People

Contributors

gusalsdmlwlq avatar

Watchers

 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.