MSWon / Sentimental-Analysis

Sentimental Analysis with Naver movie ratings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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를 통해 직접 입력한 문장에 성능 확인

About

Sentimental Analysis with Naver movie ratings


Languages

Language:Python 100.0%