[BOW] Text Mining과 Bag of Words

Author : tmlab / Date : 2016. 10. 7. 14:00 / Category : Text Mining/Python


세미나 : 파이썬 텍스트마이닝과 word2vec

Part 1: For Beginners - Bag of Words

  • Bag of Words 기법은 문서(document)를 자동으로 분류하기 위한 방법 중 하나
  • 글에 포함된 단어(word)들의 분포를 보고 이 문서가 어떤 종류의 문서인지를 판단하는 기법
  • 예를 들어, 어떤 문서에서 '환율', '주가', '금리' 등의 단어가 많이 나온다면 이 문서는 경제학에 관련된 문서로 분류하고 '역광', '노출', '구도' 등의 단어가 많다면 사진학에 대한 문서로 분류

워크디렉토리 설정 및 데이터 불러오기

In [1]:
#현재 워크 디렉토리 확인 및 변경
import os
os.getcwd() #현재 워크디렉토리 확인
Out[1]:
'C:\\Users\\user'
In [2]:
os.chdir("D:\study\Kaggle\w2v")
os.getcwd()
Out[2]:
'D:\\study\\Kaggle\\w2v'
In [3]:
# 데이터프레임을 다루기위해 판다스 import
import pandas as pd   
train = pd.read_csv("labeledTrainData.tsv", 
                    header=0, \
                    delimiter="\t", 
                    quoting=3)
In [4]:
# 영화 리뷰 데이터
train[0:5]
Out[4]:
idsentimentreview
0"5814_8"1"With all this stuff going down at the moment ...
1"2381_9"1"\"The Classic War of the Worlds\" by Timothy ...
2"7759_3"0"The film starts with a manager (Nicholas Bell...
3"3630_4"0"It must be assumed that those who praised thi...
4"9495_8"1"Superbly trashy and wondrously unpretentious ...
In [5]:
#2만5천개 영화 리뷰
train.shape
Out[5]:
(25000, 3)
In [6]:
#컬럼별 내용 확인
train.columns.values
Out[6]:
array(['id', 'sentiment', 'review'], dtype=object)
In [7]:
train["review"][0]
Out[7]:
'"With all this stuff going down at the moment with MJ i\'ve started listening to his music, watching the odd documentary here and there, watched The Wiz and watched Moonwalker again. Maybe i just want to get a certain insight into this guy who i thought was really cool in the eighties just to maybe make up my mind whether he is guilty or innocent. Moonwalker is part biography, part feature film which i remember going to see at the cinema when it was originally released. Some of it has subtle messages about MJ\'s feeling towards the press and also the obvious message of drugs are bad m\'kay.<br /><br />Visually impressive but of course this is all about Michael Jackson so unless you remotely like MJ in anyway then you are going to hate this and find it boring. Some may call MJ an egotist for consenting to the making of this movie BUT MJ and most of his fans would say that he made it for the fans which if true is really nice of him.<br /><br />The actual feature film bit when it finally starts is only on for 20 minutes or so excluding the Smooth Criminal sequence and Joe Pesci is convincing as a psychopathic all powerful drug lord. Why he wants MJ dead so bad is beyond me. Because MJ overheard his plans? Nah, Joe Pesci\'s character ranted that he wanted people to know it is he who is supplying drugs etc so i dunno, maybe he just hates MJ\'s music.<br /><br />Lots of cool things in this like MJ turning into a car and a robot and the whole Speed Demon sequence. Also, the director must have had the patience of a saint when it came to filming the kiddy Bad sequence as usually directors hate working with one kid let alone a whole bunch of them performing a complex dance scene.<br /><br />Bottom line, this movie is for people who like MJ on one level or another (which i think is most people). If not, then stay away. It does try and give off a wholesome message and ironically MJ\'s bestest buddy in this movie is a girl! Michael Jackson is truly one of the most talented people ever to grace this planet but is he guilty? Well, with all the attention i\'ve gave this subject....hmmm well i don\'t know because people can be different behind closed doors, i know this for a fact. He is either an extremely nice but stupid guy or one of the most sickest liars. I hope he is not the latter."'

텍스트 전처리 프로세스

의미없는 불용어 삭제

  • BeautifulSoup4 패키지 : get() 함수로 텍스트추출
  • 정규식 사용하여 기호제거
  • NLTK 패키지(Python Natural Language Toolkit) : stopwords
In [8]:
# 전처리를 위해 BeautifulSoup4 패키지 임포트
from bs4 import BeautifulSoup 
In [9]:
#get_text()함수는 태그나 마크업기호를 뺀 텍스트만 반환해줌
example1 = BeautifulSoup(train["review"][0])  
example1.get_text()
C:\Anaconda2\lib\site-packages\bs4\__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "lxml")

  markup_type=markup_type))
Out[9]:
u'"With all this stuff going down at the moment with MJ i\'ve started listening to his music, watching the odd documentary here and there, watched The Wiz and watched Moonwalker again. Maybe i just want to get a certain insight into this guy who i thought was really cool in the eighties just to maybe make up my mind whether he is guilty or innocent. Moonwalker is part biography, part feature film which i remember going to see at the cinema when it was originally released. Some of it has subtle messages about MJ\'s feeling towards the press and also the obvious message of drugs are bad m\'kay.Visually impressive but of course this is all about Michael Jackson so unless you remotely like MJ in anyway then you are going to hate this and find it boring. Some may call MJ an egotist for consenting to the making of this movie BUT MJ and most of his fans would say that he made it for the fans which if true is really nice of him.The actual feature film bit when it finally starts is only on for 20 minutes or so excluding the Smooth Criminal sequence and Joe Pesci is convincing as a psychopathic all powerful drug lord. Why he wants MJ dead so bad is beyond me. Because MJ overheard his plans? Nah, Joe Pesci\'s character ranted that he wanted people to know it is he who is supplying drugs etc so i dunno, maybe he just hates MJ\'s music.Lots of cool things in this like MJ turning into a car and a robot and the whole Speed Demon sequence. Also, the director must have had the patience of a saint when it came to filming the kiddy Bad sequence as usually directors hate working with one kid let alone a whole bunch of them performing a complex dance scene.Bottom line, this movie is for people who like MJ on one level or another (which i think is most people). If not, then stay away. It does try and give off a wholesome message and ironically MJ\'s bestest buddy in this movie is a girl! Michael Jackson is truly one of the most talented people ever to grace this planet but is he guilty? Well, with all the attention i\'ve gave this subject....hmmm well i don\'t know because people can be different behind closed doors, i know this for a fact. He is either an extremely nice but stupid guy or one of the most sickest liars. I hope he is not the latter."'
In [10]:
#불용어와 기호등 없애기 위해 정규식 사용
import re
letters_only = re.sub("[^a-zA-Z]",           # 바꿀패턴:대문자나 소문자가 아닌 모든것
                      " ",                   # 바뀐내용:공백으로 바꿔라
                      example1.get_text() )  # 바꿀문서
letters_only
Out[10]:
u' With all this stuff going down at the moment with MJ i ve started listening to his music  watching the odd documentary here and there  watched The Wiz and watched Moonwalker again  Maybe i just want to get a certain insight into this guy who i thought was really cool in the eighties just to maybe make up my mind whether he is guilty or innocent  Moonwalker is part biography  part feature film which i remember going to see at the cinema when it was originally released  Some of it has subtle messages about MJ s feeling towards the press and also the obvious message of drugs are bad m kay Visually impressive but of course this is all about Michael Jackson so unless you remotely like MJ in anyway then you are going to hate this and find it boring  Some may call MJ an egotist for consenting to the making of this movie BUT MJ and most of his fans would say that he made it for the fans which if true is really nice of him The actual feature film bit when it finally starts is only on for    minutes or so excluding the Smooth Criminal sequence and Joe Pesci is convincing as a psychopathic all powerful drug lord  Why he wants MJ dead so bad is beyond me  Because MJ overheard his plans  Nah  Joe Pesci s character ranted that he wanted people to know it is he who is supplying drugs etc so i dunno  maybe he just hates MJ s music Lots of cool things in this like MJ turning into a car and a robot and the whole Speed Demon sequence  Also  the director must have had the patience of a saint when it came to filming the kiddy Bad sequence as usually directors hate working with one kid let alone a whole bunch of them performing a complex dance scene Bottom line  this movie is for people who like MJ on one level or another  which i think is most people   If not  then stay away  It does try and give off a wholesome message and ironically MJ s bestest buddy in this movie is a girl  Michael Jackson is truly one of the most talented people ever to grace this planet but is he guilty  Well  with all the attention i ve gave this subject    hmmm well i don t know because people can be different behind closed doors  i know this for a fact  He is either an extremely nice but stupid guy or one of the most sickest liars  I hope he is not the latter  '
In [11]:
lower_case = letters_only.lower()        # 전부 소문자로 변환
words = lower_case.split()               # 단어로 쪼개기
words
Out[11]:
[u'with',
 u'all',
 u'this',
 u'stuff',
 u'going',
 u'down',
 u'at',
 u'the',
 u'moment',
 u'with',
 u'mj',
 u'i',
 u've',
 u'started',
 u'listening',
 u'to',
 u'his',
 u'music',
 u'watching',
 u'the',
 u'odd',
 u'documentary',
 u'here',
 u'and',
 u'there',
 u'watched',
 u'the',
 u'wiz',
 u'and',
 u'watched',
 u'moonwalker',
 u'again',
 u'maybe',
 u'i',
 u'just',
 u'want',
 u'to',
 u'get',
 u'a',
 u'certain',
 u'insight',
 u'into',
 u'this',
 u'guy',
 u'who',
 u'i',
 u'thought',
 u'was',
 u'really',
 u'cool',
 u'in',
 u'the',
 u'eighties',
 u'just',
 u'to',
 u'maybe',
 u'make',
 u'up',
 u'my',
 u'mind',
 u'whether',
 u'he',
 u'is',
 u'guilty',
 u'or',
 u'innocent',
 u'moonwalker',
 u'is',
 u'part',
 u'biography',
 u'part',
 u'feature',
 u'film',
 u'which',
 u'i',
 u'remember',
 u'going',
 u'to',
 u'see',
 u'at',
 u'the',
 u'cinema',
 u'when',
 u'it',
 u'was',
 u'originally',
 u'released',
 u'some',
 u'of',
 u'it',
 u'has',
 u'subtle',
 u'messages',
 u'about',
 u'mj',
 u's',
 u'feeling',
 u'towards',
 u'the',
 u'press',
 u'and',
 u'also',
 u'the',
 u'obvious',
 u'message',
 u'of',
 u'drugs',
 u'are',
 u'bad',
 u'm',
 u'kay',
 u'visually',
 u'impressive',
 u'but',
 u'of',
 u'course',
 u'this',
 u'is',
 u'all',
 u'about',
 u'michael',
 u'jackson',
 u'so',
 u'unless',
 u'you',
 u'remotely',
 u'like',
 u'mj',
 u'in',
 u'anyway',
 u'then',
 u'you',
 u'are',
 u'going',
 u'to',
 u'hate',
 u'this',
 u'and',
 u'find',
 u'it',
 u'boring',
 u'some',
 u'may',
 u'call',
 u'mj',
 u'an',
 u'egotist',
 u'for',
 u'consenting',
 u'to',
 u'the',
 u'making',
 u'of',
 u'this',
 u'movie',
 u'but',
 u'mj',
 u'and',
 u'most',
 u'of',
 u'his',
 u'fans',
 u'would',
 u'say',
 u'that',
 u'he',
 u'made',
 u'it',
 u'for',
 u'the',
 u'fans',
 u'which',
 u'if',
 u'true',
 u'is',
 u'really',
 u'nice',
 u'of',
 u'him',
 u'the',
 u'actual',
 u'feature',
 u'film',
 u'bit',
 u'when',
 u'it',
 u'finally',
 u'starts',
 u'is',
 u'only',
 u'on',
 u'for',
 u'minutes',
 u'or',
 u'so',
 u'excluding',
 u'the',
 u'smooth',
 u'criminal',
 u'sequence',
 u'and',
 u'joe',
 u'pesci',
 u'is',
 u'convincing',
 u'as',
 u'a',
 u'psychopathic',
 u'all',
 u'powerful',
 u'drug',
 u'lord',
 u'why',
 u'he',
 u'wants',
 u'mj',
 u'dead',
 u'so',
 u'bad',
 u'is',
 u'beyond',
 u'me',
 u'because',
 u'mj',
 u'overheard',
 u'his',
 u'plans',
 u'nah',
 u'joe',
 u'pesci',
 u's',
 u'character',
 u'ranted',
 u'that',
 u'he',
 u'wanted',
 u'people',
 u'to',
 u'know',
 u'it',
 u'is',
 u'he',
 u'who',
 u'is',
 u'supplying',
 u'drugs',
 u'etc',
 u'so',
 u'i',
 u'dunno',
 u'maybe',
 u'he',
 u'just',
 u'hates',
 u'mj',
 u's',
 u'music',
 u'lots',
 u'of',
 u'cool',
 u'things',
 u'in',
 u'this',
 u'like',
 u'mj',
 u'turning',
 u'into',
 u'a',
 u'car',
 u'and',
 u'a',
 u'robot',
 u'and',
 u'the',
 u'whole',
 u'speed',
 u'demon',
 u'sequence',
 u'also',
 u'the',
 u'director',
 u'must',
 u'have',
 u'had',
 u'the',
 u'patience',
 u'of',
 u'a',
 u'saint',
 u'when',
 u'it',
 u'came',
 u'to',
 u'filming',
 u'the',
 u'kiddy',
 u'bad',
 u'sequence',
 u'as',
 u'usually',
 u'directors',
 u'hate',
 u'working',
 u'with',
 u'one',
 u'kid',
 u'let',
 u'alone',
 u'a',
 u'whole',
 u'bunch',
 u'of',
 u'them',
 u'performing',
 u'a',
 u'complex',
 u'dance',
 u'scene',
 u'bottom',
 u'line',
 u'this',
 u'movie',
 u'is',
 u'for',
 u'people',
 u'who',
 u'like',
 u'mj',
 u'on',
 u'one',
 u'level',
 u'or',
 u'another',
 u'which',
 u'i',
 u'think',
 u'is',
 u'most',
 u'people',
 u'if',
 u'not',
 u'then',
 u'stay',
 u'away',
 u'it',
 u'does',
 u'try',
 u'and',
 u'give',
 u'off',
 u'a',
 u'wholesome',
 u'message',
 u'and',
 u'ironically',
 u'mj',
 u's',
 u'bestest',
 u'buddy',
 u'in',
 u'this',
 u'movie',
 u'is',
 u'a',
 u'girl',
 u'michael',
 u'jackson',
 u'is',
 u'truly',
 u'one',
 u'of',
 u'the',
 u'most',
 u'talented',
 u'people',
 u'ever',
 u'to',
 u'grace',
 u'this',
 u'planet',
 u'but',
 u'is',
 u'he',
 u'guilty',
 u'well',
 u'with',
 u'all',
 u'the',
 u'attention',
 u'i',
 u've',
 u'gave',
 u'this',
 u'subject',
 u'hmmm',
 u'well',
 u'i',
 u'don',
 u't',
 u'know',
 u'because',
 u'people',
 u'can',
 u'be',
 u'different',
 u'behind',
 u'closed',
 u'doors',
 u'i',
 u'know',
 u'this',
 u'for',
 u'a',
 u'fact',
 u'he',
 u'is',
 u'either',
 u'an',
 u'extremely',
 u'nice',
 u'but',
 u'stupid',
 u'guy',
 u'or',
 u'one',
 u'of',
 u'the',
 u'most',
 u'sickest',
 u'liars',
 u'i',
 u'hope',
 u'he',
 u'is',
 u'not',
 u'the',
 u'latter']

NLTK패키지를 활용한 문서 토크나이즈

  • Tokeniz란 문서를 개별어휘 단위로 쪼개는것
  • nltk패키지로 불용어 삭제
In [12]:
import nltk
nltk.download()  #다운로드 데스트데이터셋 & 스탑워즈
showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml
Out[12]:
True
In [13]:
from nltk.corpus import stopwords # stop word 리스트 및 함수 임포트
stopwords.words("english") 
Out[13]:
[u'i',
 u'me',
 u'my',
 u'myself',
 u'we',
 u'our',
 u'ours',
 u'ourselves',
 u'you',
 u'your',
 u'yours',
 u'yourself',
 u'yourselves',
 u'he',
 u'him',
 u'his',
 u'himself',
 u'she',
 u'her',
 u'hers',
 u'herself',
 u'it',
 u'its',
 u'itself',
 u'they',
 u'them',
 u'their',
 u'theirs',
 u'themselves',
 u'what',
 u'which',
 u'who',
 u'whom',
 u'this',
 u'that',
 u'these',
 u'those',
 u'am',
 u'is',
 u'are',
 u'was',
 u'were',
 u'be',
 u'been',
 u'being',
 u'have',
 u'has',
 u'had',
 u'having',
 u'do',
 u'does',
 u'did',
 u'doing',
 u'a',
 u'an',
 u'the',
 u'and',
 u'but',
 u'if',
 u'or',
 u'because',
 u'as',
 u'until',
 u'while',
 u'of',
 u'at',
 u'by',
 u'for',
 u'with',
 u'about',
 u'against',
 u'between',
 u'into',
 u'through',
 u'during',
 u'before',
 u'after',
 u'above',
 u'below',
 u'to',
 u'from',
 u'up',
 u'down',
 u'in',
 u'out',
 u'on',
 u'off',
 u'over',
 u'under',
 u'again',
 u'further',
 u'then',
 u'once',
 u'here',
 u'there',
 u'when',
 u'where',
 u'why',
 u'how',
 u'all',
 u'any',
 u'both',
 u'each',
 u'few',
 u'more',
 u'most',
 u'other',
 u'some',
 u'such',
 u'no',
 u'nor',
 u'not',
 u'only',
 u'own',
 u'same',
 u'so',
 u'than',
 u'too',
 u'very',
 u's',
 u't',
 u'can',
 u'will',
 u'just',
 u'don',
 u'should',
 u'now',
 u'd',
 u'll',
 u'm',
 u'o',
 u're',
 u've',
 u'y',
 u'ain',
 u'aren',
 u'couldn',
 u'didn',
 u'doesn',
 u'hadn',
 u'hasn',
 u'haven',
 u'isn',
 u'ma',
 u'mightn',
 u'mustn',
 u'needn',
 u'shan',
 u'shouldn',
 u'wasn',
 u'weren',
 u'won',
 u'wouldn']
In [14]:
# Remove stop words from "words"
words = [w for w in words if not w in stopwords.words("english")]
words
Out[14]:
[u'stuff',
 u'going',
 u'moment',
 u'mj',
 u'started',
 u'listening',
 u'music',
 u'watching',
 u'odd',
 u'documentary',
 u'watched',
 u'wiz',
 u'watched',
 u'moonwalker',
 u'maybe',
 u'want',
 u'get',
 u'certain',
 u'insight',
 u'guy',
 u'thought',
 u'really',
 u'cool',
 u'eighties',
 u'maybe',
 u'make',
 u'mind',
 u'whether',
 u'guilty',
 u'innocent',
 u'moonwalker',
 u'part',
 u'biography',
 u'part',
 u'feature',
 u'film',
 u'remember',
 u'going',
 u'see',
 u'cinema',
 u'originally',
 u'released',
 u'subtle',
 u'messages',
 u'mj',
 u'feeling',
 u'towards',
 u'press',
 u'also',
 u'obvious',
 u'message',
 u'drugs',
 u'bad',
 u'kay',
 u'visually',
 u'impressive',
 u'course',
 u'michael',
 u'jackson',
 u'unless',
 u'remotely',
 u'like',
 u'mj',
 u'anyway',
 u'going',
 u'hate',
 u'find',
 u'boring',
 u'may',
 u'call',
 u'mj',
 u'egotist',
 u'consenting',
 u'making',
 u'movie',
 u'mj',
 u'fans',
 u'would',
 u'say',
 u'made',
 u'fans',
 u'true',
 u'really',
 u'nice',
 u'actual',
 u'feature',
 u'film',
 u'bit',
 u'finally',
 u'starts',
 u'minutes',
 u'excluding',
 u'smooth',
 u'criminal',
 u'sequence',
 u'joe',
 u'pesci',
 u'convincing',
 u'psychopathic',
 u'powerful',
 u'drug',
 u'lord',
 u'wants',
 u'mj',
 u'dead',
 u'bad',
 u'beyond',
 u'mj',
 u'overheard',
 u'plans',
 u'nah',
 u'joe',
 u'pesci',
 u'character',
 u'ranted',
 u'wanted',
 u'people',
 u'know',
 u'supplying',
 u'drugs',
 u'etc',
 u'dunno',
 u'maybe',
 u'hates',
 u'mj',
 u'music',
 u'lots',
 u'cool',
 u'things',
 u'like',
 u'mj',
 u'turning',
 u'car',
 u'robot',
 u'whole',
 u'speed',
 u'demon',
 u'sequence',
 u'also',
 u'director',
 u'must',
 u'patience',
 u'saint',
 u'came',
 u'filming',
 u'kiddy',
 u'bad',
 u'sequence',
 u'usually',
 u'directors',
 u'hate',
 u'working',
 u'one',
 u'kid',
 u'let',
 u'alone',
 u'whole',
 u'bunch',
 u'performing',
 u'complex',
 u'dance',
 u'scene',
 u'bottom',
 u'line',
 u'movie',
 u'people',
 u'like',
 u'mj',
 u'one',
 u'level',
 u'another',
 u'think',
 u'people',
 u'stay',
 u'away',
 u'try',
 u'give',
 u'wholesome',
 u'message',
 u'ironically',
 u'mj',
 u'bestest',
 u'buddy',
 u'movie',
 u'girl',
 u'michael',
 u'jackson',
 u'truly',
 u'one',
 u'talented',
 u'people',
 u'ever',
 u'grace',
 u'planet',
 u'guilty',
 u'well',
 u'attention',
 u'gave',
 u'subject',
 u'hmmm',
 u'well',
 u'know',
 u'people',
 u'different',
 u'behind',
 u'closed',
 u'doors',
 u'know',
 u'fact',
 u'either',
 u'extremely',
 u'nice',
 u'stupid',
 u'guy',
 u'one',
 u'sickest',
 u'liars',
 u'hope',
 u'latter']

텍스트 전처리를 종합해보면!!!

  • 1) BeautifulSoup 패키지 get()함수로 텍스트를 빼서
  • 2) re 모듈의 re.sub함수에 정규식을 적용해 기호를 제거
  • 3) 모든문자를 소문자 lower() 로 바꾼후 단어로 쪼개고 split()
  • 4) 불용어 세트를 설정하고
  • 5) for문을 돌려서 불용어를 삭제한다.
In [15]:
def review_to_words( raw_review ):
    review_text = BeautifulSoup(raw_review).get_text()   # 1. Remove HTML 
    letters_only = re.sub("[^a-zA-Z]", " ", review_text) # 2. Remove non-letters 
    words = letters_only.lower().split()    # 3. Convert to lower case, split words                             
    stops = set(stopwords.words("english")) # 4. Convert list to stop words set     
    meaningful_words = [w for w in words if not w in stops] # 5. Remove stop words 
    return( " ".join( meaningful_words ))   
    # 6. Join the words back into one string separated by space,
In [16]:
clean_review = review_to_words( train["review"][0] )
clean_review
Out[16]:
u'stuff going moment mj started listening music watching odd documentary watched wiz watched moonwalker maybe want get certain insight guy thought really cool eighties maybe make mind whether guilty innocent moonwalker part biography part feature film remember going see cinema originally released subtle messages mj feeling towards press also obvious message drugs bad kay visually impressive course michael jackson unless remotely like mj anyway going hate find boring may call mj egotist consenting making movie mj fans would say made fans true really nice actual feature film bit finally starts minutes excluding smooth criminal sequence joe pesci convincing psychopathic powerful drug lord wants mj dead bad beyond mj overheard plans nah joe pesci character ranted wanted people know supplying drugs etc dunno maybe hates mj music lots cool things like mj turning car robot whole speed demon sequence also director must patience saint came filming kiddy bad sequence usually directors hate working one kid let alone whole bunch performing complex dance scene bottom line movie people like mj one level another think people stay away try give wholesome message ironically mj bestest buddy movie girl michael jackson truly one talented people ever grace planet guilty well attention gave subject hmmm well know people different behind closed doors know fact either extremely nice stupid guy one sickest liars hope latter'
In [17]:
# 문서개수 확인후(25000)
num_reviews = train["review"].size

# 비어있는 어레이 생성하고
clean_train_reviews = []

# for문으로 각문서를 review_to_words함수돌려서 clean_train_reviews에 추가함
for i in range( 0, num_reviews ):
    clean_train_reviews.append( review_to_words( train["review"][i] ) )

제대로 작동하고 있는지 확인하기 위해서 요렇게한다고함(선택)

In [18]:
print "Cleaning and parsing the training set movie reviews...\n"
clean_train_reviews = []
for i in xrange( 0, num_reviews ):
    # If the index is evenly divisible by 1000, print a message
    if( (i+1)%1000 == 0 ):
        print "Review %d of %d\n" % ( i+1, num_reviews )                                                                    
    clean_train_reviews.append( review_to_words( train["review"][i] ))
Cleaning and parsing the training set movie reviews...

Review 1000 of 25000

Review 2000 of 25000

Review 3000 of 25000

Review 4000 of 25000

Review 5000 of 25000

Review 6000 of 25000

Review 7000 of 25000

Review 8000 of 25000

Review 9000 of 25000

Review 10000 of 25000

Review 11000 of 25000

Review 12000 of 25000

Review 13000 of 25000

Review 14000 of 25000

Review 15000 of 25000

Review 16000 of 25000

Review 17000 of 25000

Review 18000 of 25000

Review 19000 of 25000

Review 20000 of 25000

Review 21000 of 25000

Review 22000 of 25000

Review 23000 of 25000

Review 24000 of 25000

Review 25000 of 25000

Creating Features from a Bag of Words (Using scikit-learn)

  • 머신러닝에 적용하기위해 문서를 숫자로 변환하는 방법
  • 해당문서에 각 단어가 몇번 등장했는지를 카운드한다
  • Sentence 1: "The cat sat on the hat"
  • Sentence 2: "The dog ate the cat and the hat"
  • 위 두 문장에의 단어 { the, cat, sat, on, hat, dog, ate, and }
  • Sentence 1: { 2, 1, 1, 1, 1, 0, 0, 0 }
  • Sentence 2: { 3, 1, 0, 0, 1, 1, 1, 1 }

scikit-learn 모듈로 Bag of Words 피쳐 추출

  • scikit-learn의 "CountVectorizer"함수 사용
  • 가장 빈번히 발생한 5000개단어로 벡터피쳐를 뽑아냄(차원의 저주)
  • 인수로 토크나이저, 전처리, 스탑워드 기능을 함께수행할수 있음
In [19]:
#"Creating the bag of words
from sklearn.feature_extraction.text import CountVectorizer

# scikit-learn의 "CountVectorizer"는 bag of words 만들어주는 함수  
vectorizer = CountVectorizer(analyzer = "word",   
                             tokenizer = None,    
                             preprocessor = None, 
                             stop_words = None,   
                             max_features = 5000) 

# fit_transform() 은 두가지 기능을 수행한다.
# 1)모델 피팅 및 단어학습을 수행한다. 
# 2)텍스트 데이터를 피쳐벡터로 변환한다.(인풋은 list형태이어야함)

# strings.
train_data_features = vectorizer.fit_transform(clean_train_reviews)

# Numpy arrays are easy to work with, so convert the result to array
train_data_features = train_data_features.toarray()

결과확인

  • 데이터형태(array)
  • 추출한 워드피쳐 개수(25000개문서->5000워드추출)
  • 5000개 word 목록
In [20]:
train_data_features
Out[20]:
array([[0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       ..., 
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0]], dtype=int64)
In [21]:
train_data_features.shape
Out[21]:
(25000L, 5000L)
In [22]:
vocab = vectorizer.get_feature_names()
vocab
Out[22]:
[u'abandoned',
 u'abc',
 u'abilities',
 u'ability',
 u'able',
 u'abraham',
 u'absence',
 u'absent',
 u'absolute',
 u'absolutely',
 u'absurd',
 u'abuse',
 u'abusive',
 u'abysmal',
 u'academy',
 u'accent',
 u'accents',
 u'accept',
 u'acceptable',
 u'accepted',
 u'access',
 u'accident',
 u'accidentally',
 u'accompanied',
 u'accomplished',
 u'according',
 u'account',
 u'accuracy',
 u'accurate',
 u'accused',
 u'achieve',
 u'achieved',
 u'achievement',
 u'acid',
 u'across',
 u'act',
 u'acted',
 u'acting',
 u'action',
 u'actions',
 u'activities',
 u'actor',
 u'actors',
 u'actress',
 u'actresses',
 u'acts',
 u'actual',
 u'actually',
 u'ad',
 u'adam',
 u'adams',
 u'adaptation',
 u'adaptations',
 u'adapted',
 u'add',
 u'added',
 u'adding',
 u'addition',
 u'adds',
 u'adequate',
 u'admire',
 u'admit',
 u'admittedly',
 u'adorable',
 u'adult',
 u'adults',
 u'advance',
 u'advanced',
 u'advantage',
 u'adventure',
 u'adventures',
 u'advertising',
 u'advice',
 u'advise',
 u'affair',
 u'affect',
 u'affected',
 u'afford',
 u'aforementioned',
 u'afraid',
 u'africa',
 u'african',
 u'afternoon',
 u'afterwards',
 u'age',
 u'aged',
 u'agent',
 u'agents',
 u'ages',
 u'aging',
 u'ago',
 u'agree',
 u'agreed',
 u'agrees',
 u'ah',
 u'ahead',
 u'aid',
 u'aids',
 u'aim',
 u'aimed',
 u'air',
 u'aired',
 u'airplane',
 u'airport',
 u'aka',
 u'akshay',
 u'al',
 u'alan',
 u'alas',
 u'albeit',
 u'albert',
 u'album',
 u'alcohol',
 u'alcoholic',
 u'alec',
 u'alert',
 u'alex',
 u'alexander',
 u'alfred',
 u'alice',
 u'alicia',
 u'alien',
 u'aliens',
 u'alike',
 u'alison',
 u'alive',
 u'allen',
 u'allow',
 u'allowed',
 u'allowing',
 u'allows',
 u'almost',
 u'alone',
 u'along',
 u'alongside',
 u'already',
 u'alright',
 u'also',
 u'alternate',
 u'alternative',
 u'although',
 u'altman',
 u'altogether',
 u'always',
 u'amanda',
 u'amateur',
 u'amateurish',
 u'amazed',
 u'amazing',
 u'amazingly',
 u'ambiguous',
 u'ambitious',
 u'america',
 u'american',
 u'americans',
 u'amitabh',
 u'among',
 u'amongst',
 u'amount',
 u'amounts',
 u'amused',
 u'amusing',
 u'amy',
 u'analysis',
 u'ancient',
 u'anderson',
 u'andre',
 u'andrew',
 u'andrews',
 u'andy',
 u'angel',
 u'angela',
 u'angeles',
 u'angels',
 u'anger',
 u'angle',
 u'angles',
 u'angry',
 u'animal',
 u'animals',
 u'animated',
 u'animation',
 u'anime',
 u'ann',
 u'anna',
 u'anne',
 u'annie',
 u'annoyed',
 u'annoying',
 u'another',
 u'answer',
 u'answers',
 u'anthony',
 u'anti',
 u'antics',
 u'antonioni',
 u'antwone',
 u'anybody',
 u'anymore',
 u'anyone',
 u'anything',
 u'anyway',
 u'anyways',
 u'anywhere',
 u'apart',
 u'apartment',
 u'ape',
 u'apes',
 u'appalling',
 u'apparent',
 u'apparently',
 u'appeal',
 u'appealing',
 u'appear',
 u'appearance',
 u'appearances',
 u'appeared',
 u'appearing',
 u'appears',
 u'appreciate',
 u'appreciated',
 u'appreciation',
 u'approach',
 u'appropriate',
 u'april',
 u'area',
 u'areas',
 u'arguably',
 u'argue',
 u'argument',
 u'arm',
 u'armed',
 u'arms',
 u'army',
 u'arnold',
 u'around',
 u'arrested',
 u'arrival',
 u'arrive',
 u'arrived',
 u'arrives',
 u'arrogant',
 u'art',
 u'arthur',
 u'artificial',
 u'artist',
 u'artistic',
 u'artists',
 u'arts',
 u'ashamed',
 u'ashley',
 u'asian',
 u'aside',
 u'ask',
 u'asked',
 u'asking',
 u'asks',
 u'asleep',
 u'aspect',
 u'aspects',
 u'ass',
 u'assassin',
 u'assault',
 u'assigned',
 u'assistant',
 u'associated',
 u'assume',
 u'assumed',
 u'astaire',
 u'astonishing',
 u'atlantis',
 u'atmosphere',
 u'atmospheric',
 u'atrocious',
 u'attached',
 u'attack',
 u'attacked',
 u'attacks',
 u'attempt',
 u'attempted',
 u'attempting',
 u'attempts',
 u'attend',
 u'attention',
 u'attitude',
 u'attitudes',
 u'attorney',
 u'attracted',
 u'attraction',
 u'attractive',
 u'audience',
 u'audiences',
 u'audio',
 u'aunt',
 u'austen',
 u'austin',
 u'australia',
 u'australian',
 u'authentic',
 u'author',
 u'authority',
 u'available',
 u'average',
 u'avoid',
 u'avoided',
 u'awake',
 u'award',
 u'awards',
 u'aware',
 u'away',
 u'awe',
 u'awesome',
 u'awful',
 u'awfully',
 u'awhile',
 u'awkward',
 u'babe',
 u'baby',
 u'bacall',
 u'back',
 u'backdrop',
 u'background',
 u'backgrounds',
 u'bad',
 u'badly',
 u'bag',
 u'baker',
 u'bakshi',
 u'balance',
 u'baldwin',
 u'ball',
 u'ballet',
 u'balls',
 u'band',
 u'bands',
 u'bang',
 u'bank',
 u'banned',
 u'bar',
 u'barbara',
 u'bare',
 u'barely',
 u'bargain',
 u'barry',
 u'barrymore',
 u'base',
 u'baseball',
 u'based',
 u'basement',
 u'basic',
 u'basically',
 u'basis',
 u'basketball',
 u'bat',
 u'bath',
 u'bathroom',
 u'batman',
 u'battle',
 u'battles',
 u'bay',
 u'bbc',
 u'beach',
 u'bear',
 u'bears',
 u'beast',
 u'beat',
 u'beaten',
 u'beating',
 u'beats',
 u'beatty',
 u'beautiful',
 u'beautifully',
 u'beauty',
 u'became',
 u'become',
 u'becomes',
 u'becoming',
 u'bed',
 u'bedroom',
 u'beer',
 u'began',
 u'begin',
 u'beginning',
 u'begins',
 u'behave',
 u'behavior',
 u'behind',
 u'beings',
 u'bela',
 u'belief',
 u'beliefs',
 u'believable',
 u'believe',
 u'believed',
 u'believes',
 u'believing',
 u'bell',
 u'belong',
 u'belongs',
 u'beloved',
 u'belushi',
 u'ben',
 u'beneath',
 u'benefit',
 u'bergman',
 u'berlin',
 u'besides',
 u'best',
 u'bet',
 u'bette',
 u'better',
 u'bettie',
 u'betty',
 u'beyond',
 u'bible',
 u'big',
 u'bigger',
 u'biggest',
 u'biko',
 u'bill',
 u'billed',
 u'billy',
 u'bin',
 u'biography',
 u'bird',
 u'birds',
 u'birth',
 u'birthday',
 u'bit',
 u'bite',
 u'bits',
 u'bitter',
 u'bizarre',
 u'black',
 u'blade',
 u'blah',
 u'blair',
 u'blake',
 u'blame',
 u'bland',
 u'blank',
 u'blast',
 u'blatant',
 u'bleak',
 u'blend',
 u'blew',
 u'blind',
 u'blob',
 u'block',
 u'blockbuster',
 u'blond',
 u'blonde',
 u'blood',
 u'bloody',
 u'blow',
 u'blowing',
 u'blown',
 u'blows',
 u'blue',
 u'blues',
 u'blunt',
 u'bo',
 u'board',
 u'boat',
 u'bob',
 u'bobby',
 u'bodies',
 u'body',
 u'bold',
 u'boll',
 u'bollywood',
 u'bomb',
 u'bond',
 u'bone',
 u'bonus',
 u'book',
 u'books',
 u'boom',
 u'boot',
 u'border',
 u'bore',
 u'bored',
 u'boredom',
 u'boring',
 u'born',
 u'borrowed',
 u'boss',
 u'bother',
 u'bothered',
 u'bottle',
 u'bottom',
 u'bought',
 u'bound',
 u'bourne',
 u'box',
 u'boxing',
 u'boy',
 u'boyfriend',
 u'boyle',
 u'boys',
 u'brad',
 u'brady',
 u'brain',
 u'brains',
 u'branagh',
 u'brand',
 u'brando',
 u'brave',
 u'brazil',
 u'break',
 u'breaking',
 u'breaks',
 u'breasts',
 u'breath',
 u'breathtaking',
 u'brenda',
 u'brian',
 u'bride',
 u'bridge',
 u'brief',
 u'briefly',
 u'bright',
 u'brilliance',
 u'brilliant',
 u'brilliantly',
 u'bring',
 u'bringing',
 u'brings',
 u'britain',
 u'british',
 u'broad',
 u'broadcast',
 u'broadway',
 u'broke',
 u'broken',
 u'brooklyn',
 u'brooks',
 u'brosnan',
 u'brother',
 u'brothers',
 u'brought',
 u'brown',
 u'bruce',
 u'brutal',
 u'brutality',
 u'brutally',
 u'buck',
 u'bucks',
 u'bud',
 u'buddies',
 u'buddy',
 u'budget',
 u'buff',
 u'buffalo',
 u'buffs',
 u'bug',
 u'bugs',
 u'build',
 u'building',
 u'buildings',
 u'builds',
 u'built',
 u'bull',
 u'bullet',
 u'bullets',
 u'bumbling',
 u'bunch',
 u'bunny',
 u'buried',
 u'burn',
 u'burned',
 u'burning',
 u'burns',
 u'burt',
 u'burton',
 u'bus',
 u'bush',
 u'business',
 u'businessman',
 u'buster',
 u'busy',
 u'butler',
 u'butt',
 u'button',
 u'buy',
 u'buying',
 u'cabin',
 u'cable',
 u'cage',
 u'cagney',
 u'caine',
 u'cake',
 u'caliber',
 u'california',
 u'call',
 u'called',
 u'calling',
 u'calls',
 u'calm',
 u'came',
 u'cameo',
 u'cameos',
 u'camera',
 u'cameras',
 u'cameron',
 u'camp',
 u'campbell',
 u'campy',
 u'canada',
 u'canadian',
 u'candy',
 u'cannibal',
 u'cannot',
 u'cant',
 u'capable',
 u'capital',
 u'captain',
 u'captivating',
 u'capture',
 u'captured',
 u'captures',
 u'capturing',
 u'car',
 u'card',
 u'cardboard',
 u'cards',
 u'care',
 u'cared',
 u'career',
 u'careers',
 u'careful',
 u'carefully',
 u'carell',
 u'cares',
 u'caring',
 u'carl',
 u'carla',
 u'carol',
 u'carpenter',
 u'carradine',
 u'carrey',
 u'carrie',
 u'carried',
 u'carries',
 u'carry',
 u'carrying',
 u'cars',
 u'carter',
 u'cartoon',
 u'cartoons',
 u'cary',
 u'case',
 u'cases',
 u'cash',
 u'cassidy',
 u'cast',
 u'casting',
 u'castle',
 u'cat',
 u'catch',
 u'catches',
 u'catching',
 u'catchy',
 u'category',
 u'catherine',
 u'catholic',
 u'cats',
 u'caught',
 u'cause',
 u'caused',
 u'causes',
 u'causing',
 u'cave',
 u'cd',
 u'celebrity',
 u'cell',
 u'celluloid',
 u'center',
 u'centered',
 u'centers',
 u'central',
 u'century',
 u'certain',
 u'certainly',
 u'cg',
 u'cgi',
 u'chain',
 u'chair',
 u'challenge',
 u'challenging',
 u'championship',
 u'chan',
 u'chance',
 u'chances',
 u'change',
 u'changed',
 u'changes',
 u'changing',
 u'channel',
 u'channels',
 u'chaos',
 u'chaplin',
 u'chapter',
 u'character',
 u'characterization',
 u'characters',
 u'charge',
 u'charisma',
 u'charismatic',
 u'charles',
 u'charlie',
 u'charlotte',
 u'charm',
 u'charming',
 u'chase',
 u'chased',
 u'chases',
 u'chasing',
 u'che',
 u'cheap',
 u'cheated',
 u'cheating',
 u'check',
 u'checked',
 u'checking',
 u'cheek',
 u'cheese',
 u'cheesy',
 u'chemistry',
 u'chess',
 u'chest',
 u'chicago',
 u'chick',
 u'chicken',
 u'chicks',
 u'chief',
 u'child',
 u'childhood',
 u'childish',
 u'children',
 u'chilling',
 u'china',
 u'chinese',
 u'choice',
 u'choices',
 u'choose',
 u'chooses',
 u'choreographed',
 u'choreography',
 u'chorus',
 u'chose',
 u'chosen',
 u'chris',
 u'christ',
 u'christian',
 u'christianity',
 u'christians',
 u'christmas',
 u'christopher',
 u'christy',
 u'chuck',
 u'church',
 u'cia',
 u'cinderella',
 u'cinema',
 u'cinematic',
 u'cinematographer',
 u'cinematography',
 u'circle',
 u'circumstances',
 u'cities',
 u'citizen',
 u'city',
 u'civil',
 u'civilization',
 u'claim',
 u'claimed',
 u'claims',
 u'claire',
 u'clark',
 u'class',
 u'classes',
 u'classic',
 u'classical',
 u'classics',
 u'claus',
 u'clean',
 u'clear',
 u'clearly',
 u'clever',
 u'cleverly',
 u'clich',
 u'cliche',
 u'cliff',
 u'climactic',
 u'climax',
 u'clint',
 u'clip',
 u'clips',
 u'clock',
 u'close',
 u'closed',
 u'closely',
 u'closer',
 u'closest',
 u'closet',
 u'closing',
 u'clothes',
 u'clothing',
 u'clown',
 u'club',
 u'clue',
 u'clues',
 u'clumsy',
 u'co',
 u'coach',
 u'coast',
 u'code',
 u'coffee',
 u'coherent',
 u'cold',
 u'cole',
 u'collection',
 u'college',
 u'colonel',
 u'color',
 u'colorful',
 u'colors',
 u'colour',
 u'columbo',
 u'com',
 u'combat',
 u'combination',
 u'combine',
 u'combined',
 u'come',
 u'comedian',
 u'comedic',
 u'comedies',
 u'comedy',
 u'comes',
 u'comfort',
 u'comfortable',
 u'comic',
 u'comical',
 u'comics',
 u'coming',
 u'command',
 u'comment',
 u'commentary',
 u'commented',
 u'comments',
 u'commercial',
 u'commercials',
 u'commit',
 u'committed',
 u'common',
 u'communist',
 u'community',
 u'companies',
 u'companion',
 u'company',
 u'compare',
 u'compared',
 u'comparing',
 u'comparison',
 u'compassion',
 u'compelled',
 u'compelling',
 u'competent',
 u'competition',
 u'complain',
 u'complaint',
 u'complete',
 u'completely',
 u'complex',
 u'complexity',
 u'complicated',
 u'composed',
 u'composer',
 u'computer',
 u'con',
 u'conceived',
 u'concept',
 u'concern',
 u'concerned',
 u'concerning',
 u'concerns',
 u'concert',
 u'conclusion',
 u'condition',
 u'conditions',
 u'confess',
 u'confidence',
 u'conflict',
 u'conflicts',
 u'confrontation',
 u'confused',
 u'confusing',
 u'confusion',
 u'connect',
 u'connected',
 u'connection',
 u'connery',
 u'conscious',
 u'consequences',
 u'conservative',
 u'consider',
 u'considerable',
 u'considered',
 u'considering',
 u'consistent',
 u'consistently',
 u'consists',
 u'conspiracy',
 u'constant',
 u'constantly',
 u'constructed',
 u'construction',
 u'contact',
 u'contain',
 u'contained',
 u'contains',
 u'contemporary',
 u'content',
 u'contest',
 u'context',
 u'continue',
 u'continued',
 u'continues',
 u'continuity',
 u'contract',
 u'contrary',
 u'contrast',
 u'contrived',
 u'control',
 u'controversial',
 u'conventional',
 u'conversation',
 u'conversations',
 u'convey',
 u'convince',
 u'convinced',
 u'convincing',
 u'convincingly',
 u'convoluted',
 u'cook',
 u'cool',
 u'cooper',
 u'cop',
 u'copies',
 u'cops',
 u'copy',
 u'core',
 u'corner',
 u'corny',
 u'corporate',
 u'corpse',
 u'correct',
 u'correctly',
 u'corrupt',
 u'corruption',
 u'cost',
 u'costs',
 u'costume',
 u'costumes',
 u'could',
 u'count',
 u'counter',
 u'countless',
 u'countries',
 u'country',
 u'countryside',
 u'couple',
 u'couples',
 u'courage',
 u'course',
 u'court',
 u'cousin',
 u'cover',
 u'covered',
 u'covers',
 u'cowboy',
 u'cox',
 u'crack',
 u'cracking',
 u'craft',
 u'crafted',
 u'craig',
 u'crap',
 u'crappy',
 u'crash',
 u'craven',
 u'crawford',
 u'crazed',
 u'crazy',
 u'cream',
 u'create',
 u'created',
 u'creates',
 ...]
  • 단어별 빈도를 집계해서 보고싶다면 아래코드로 확인해볼수 있음(선택사항)
In [23]:
import numpy as np

# Sum up the counts of each vocabulary word
dist = np.sum(train_data_features, axis=0)

# For each, print the vocabulary word and the number of times 
# appears in the training set
for tag, count in zip(vocab, dist):
    count, tag

학습데이터로 머신러닝 돌려보기

  • 분류분석 : 앙상블기법랜덤포레스트(sklearn패키지)
  • bag of words를 보고 어떤감정의 문서인지 분류

train

In [24]:
from sklearn.ensemble import RandomForestClassifier

# 100개의 트리로 모델트레이닝
forest = RandomForestClassifier(n_estimators = 100) 

# feature로 만들어진 bag of words를 랜덤포레스트에 모델피팅
forest = forest.fit( train_data_features, train["sentiment"] )

test

  • 트레이닝데이터에서 피쳐추출시 "fit_transform" 함수사용
  • 이미 피쳐가 추출되어있기때문에 테스트셋에는 "transform"함수를 사용
  • 테스트데이터 전처리
In [25]:
# 데이터 로딩
test = pd.read_csv("testData.tsv", header=0, delimiter="\t", \
                   quoting=3 )

# 데이터 확인
test.shape

# 데이터숫자 산출, 빈 어레이 생성
num_reviews = len(test["review"])
clean_test_reviews = [] 

# 빈 어레이에 클리닝한 데이터 추가
for i in range(0,num_reviews):
    if( (i+1) % 1000 == 0 ):
        "Review %d of %d\n" % (i+1, num_reviews)
    clean_review = review_to_words( test["review"][i] )
    clean_test_reviews.append( clean_review )
  • 피쳐추출 및 테스트
In [26]:
# vectorizer.transform 함수로 피쳐추출
test_data_features = vectorizer.transform(clean_test_reviews)
test_data_features = test_data_features.toarray()

# 랜덤포레스트 알고리즘으로 예측
result = forest.predict(test_data_features)

# Copy the results to a pandas dataframe with an "id" column and
# a "sentiment" column
output = pd.DataFrame( data={"id":test["id"], "sentiment":result} )

# Use pandas to write the comma-separated output file
output.to_csv( "Bag_of_Words_model.csv", index=False, quoting=3 )
  • 결과확인
In [27]:
pd.read_csv("Bag_of_Words_model.csv", 
                    header=0, \
                    quoting=3)
Out[27]:
idsentiment
0"12311_10"1
1"8348_2"0
2"5828_4"1
3"7186_2"1
4"12128_7"1
5"2913_8"0
6"4396_1"0
7"395_2"1
8"10616_1"0
9"9074_9"1
10"9252_3"1
11"9896_9"1
12"574_4"1
13"11182_8"1
14"11656_4"0
15"2322_4"0
16"8703_1"0
17"7483_1"0
18"6007_10"1
19"12424_4"0
20"4672_1"0
21"10841_3"0
22"8954_7"1
23"7392_1"0
24"10288_8"1
25"5343_4"0
26"4950_1"0
27"9257_4"0
28"8689_3"0
29"4480_2"1
.........
24970"6857_10"1
24971"11091_8"1
24972"4167_2"1
24973"679_4"0
24974"10147_1"0
24975"6875_1"0
24976"923_10"1
24977"6200_8"0
24978"7208_8"1
24979"5363_8"1
24980"4067_8"0
24981"1773_7"1
24982"1498_10"1
24983"10497_10"1
24984"3444_10"1
24985"588_2"0
24986"9678_9"1
24987"1983_9"0
24988"5012_3"0
24989"12240_2"1
24990"5071_2"0
24991"5078_2"0
24992"10069_3"1
24993"7407_8"1
24994"7207_1"0
24995"2155_10"1
24996"59_10"1
24997"2531_1"0
24998"7772_8"1
24999"11465_10"0

25000 rows × 2 columns


Archives

05-16 18:47

Contact Us

Address
경기도 수원시 영통구 원천동 산5번지 아주대학교 다산관 429호

E-mail
textminings@gmail.com

Phone
031-219-2910

Tags

Calendar

«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Copyright © All Rights Reserved
Designed by CMSFactory.NET