Code Monkey home page Code Monkey logo

sentimental-analysis's Introduction

BiLSTM을 이용한 영화 리뷰 감성분석

Word2Vec을 통해 임베딩 된 네이버 영화 리뷰 데이터를 BiLSTM을 통해 긍정, 부정을 분류해 주는 프로젝트

1. 모델 구조도

alt text

  1. 정답이 있는 네이버 영화 리뷰 데이터 15만건(박은정님 제공)에 대해서 품사 태깅

  2. 품사 태깅한 단어들에 대해 Word2Vec을 이용해 학습시킨 임베딩 벡터로 변환

  3. 단어 벡터들을 BiLSTM에 넣어서 양쪽 끝 state들에 대해서 fully connected layerSoftmax함수를 이용해 분류

2. 필요한 패키지

3. 데이터

4. 학습

alt text

  1. Sentimental-Analysis 폴더를 github로부터 다운로드

  2. Word2Vec_train.py로 품사 태깅한 단어들에 대해서 Word2Vec 학습 후 모델 저장 Word2vec.model

  3. Word2Vec_Tensorboard.py를 통해 시각화

  4. cmd창에 cd ./Sentimental-Analysis-master/Sentimental-Analysis-master/Bidirectional_LSTM 경로로 이동

  5. python Bi_LSTM_train.py 명령어를 통해 이진 분류기 학습

alt text

epoch 4 이후에 overfitting이 되므로 epoch 4에서 early stopping을 한다.

5. 결과

alt text

  • Bi_LSTM_test.py를 통해 test data에 대해서 성능 확인 (86.52%)

  • Doc2Vec, Term-existance Naive Bayes에 의한 성능 보다 뛰어남(박은정)

alt text

  • Grade_review.py를 통해 직접 입력한 문장에 성능 확인

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.