# 전처리한 네이버 영화 리뷰 데이터 상위 5개 출력
train_data[:5]

image.png

stopwords = ['의','가','이','은','들','는','좀','잘','걍','과','도','를','으로','자','에','와','한','하다']

# 형태소 분석기 OKT를 사용한 토큰화 작업 (다소 시간 소요)
okt = Okt()

tokenized_data = []
for sentence in tqdm(train_data['document']):
    tokenized_sentence = okt.morphs(sentence, stem=True) # 토큰화
    stopwords_removed_sentence = [word for word in tokenized_sentence if not word in stopwords] # 불용어 제거
    tokenized_data.append(stopwords_removed_sentence)

tqdm은 아랍어 ‘taqaddum’의 약자로, ‘진행’이라는 의미를 가지며 프로그래머에게 어떠한 프로세스의 진행 상황을 시각적으로 보여주는 라이브러리이다.

```CBOW
이민호: 0.8794064521789551
한석규: 0.8692898154258728
안성기: 0.8512387275695801
송강호: 0.8377683758735657
이정재: 0.8361799716949463
윤제문: 0.8330925107002258
김명민: 0.8300824761390686
엄태웅: 0.8254532814025879
조재현: 0.8194581866264343
이범수: 0.8188595771789551

```python
```Skip gram
김명민: 0.8393404483795166
안성기: 0.8389666080474854
한석규: 0.8280355930328369
서영희: 0.806579053401947
김창완: 0.7937339544296265
김갑수: 0.7931920886039734
최민수: 0.7920576333999634
조재현: 0.7878143787384033
황정민: 0.7876128554344177
윤제문: 0.7834720611572266

```python
```CBOW
느와르: 0.8699038624763489
호러: 0.8539336919784546
블록버스터: 0.8431833386421204
무비: 0.8272547721862793
무협: 0.8208001852035522
물: 0.8104904294013977
정통: 0.8092069625854492
슬래셔: 0.8003708124160767
물의: 0.793299674987793
틴: 0.7789984941482544

```python
```Skip gram
마블: 0.8179700970649719
슬래셔: 0.8011248111724854
첩보물: 0.7964761853218079
괴수: 0.776088297367096
다이하드: 0.7737719416618347
로맨스코미디: 0.7608872652053833
서유기: 0.7589330077171326
오컬트: 0.7531830668449402
갱스터: 0.751255989074707
수사물: 0.7481505870819092