트위터 상의 어휘 생성 확대를 위한 이종 데이터타입을 고려한 감성 분석 프레임워크
- Alternative Title
- A Sentiment Analysis Framework Incorporating Heterogeneous Datatypes to Enhance Lexicon Generation on Twitter
- Abstract
- 소셜미디어 텍스트에 대한 감성분석(SA: Sentiment Analysis)의 활용은 공공 및 상업 분야에서 많은 관심을 받아왔다. 그러나 텍스트 상의 감정을 파악하기 위해 사용되는 일반적인 어휘들의 제약으로 인해, 기존의 연구들은 부정확한 결과와 맥락을 놓치는 분석을 보여왔다. 이러한 단점을 극복하기 위해, 본 연구에서는 소셜 미디어 상에서 어휘의 생성을 강화하기 위한 감성분석 프레임워크를 제안한다. 제안된 프레임워크에 대한 파일럿 구현이 트위터를 대상으로 개발되었으며, 어휘 생성을 촉진하기 위해 이종의 데이터타입을 고려할 수 있도록 하였다. 본 프레임워크에서는 단어수준과 트윗수준에서 단어와 트윗 사이의 관계를 탐색함으로써, 트위터 상에서 단어-감정 어휘사전을 자동적으로 생성하게 된다. 사전 및 코퍼스 기반의 접근법을 사용하였으며, ‘그리고, 그러나, 혹은’과 같은 언어상의 특징을 고려하여 용어들과 트윗들을 7개의 감성 영역으로 구분하였다. 7 개의 감성 영역에서 어휘/단어의 발생 빈도 평균을 계산함으로써 감성 스코어를 계산하였다. 각 감성 영역에서의 발생 확률은 같은 정도로 하였다. 이런 방식으로 본 연구에서는 토픽 수준에서 지배적인 감성 영역을 파악하고자 시도하였다. 감성 구분에 대한 효과성을 검증하기 위해 건강, 기술 및 교육 분야와 관련된 주제를 사용하였다. 전체 토픽 모두에서 중립적 단어들이 가장 자주 발생하는 것으로 나타났다.
단어 수준의 테스트 단계에서 감성 영역의 정확도 (accuracy), 정밀도 (precision), 재현율 (recall) 및 F-척도값 (F-measure)은 각각 96.93%, 97.09%, 99.67%, 97.96%로 얻어졌다. 한편 트윗 수준에서는 정확도, 정밀도, 재현율 및 F-척도값이 앞서보다는 조금씩 낮은 86.3%, 86.8%, 95.0%, 90.7%를 각각 보였다. 정확도와 정밀도는 트윗 수준보다 단어 수준의 값이 더 높았으며, 후보 어휘 (candidate word)와 종자 어휘 (seed word) 간에는 연관관계가 있음을 알 수 있었다.
본 연구에서 개발된 시스템에서는 데이터 함수의 처리를 위해 MySQL과 MongoDB 데이터베이스를 사용하였다. 본 프레임워크에서는 두 저장 시스템들의 운영 성능을 전처리, 처리 및 평가 단계로 측정하였다. 측정결과 MySQL이 대용량의 비구조적인 데이터의 처리에서 MongoDB 보다 더 느리다는 것을 확인할 수 있었다. MongoDB는 문서 스키마 상의 유연성으로 인해 읽기 작업보다 쓰기 작업에 더 효과를 보였다. 질의를 수행하기 위한 MongoDB의 읽기 작업 시간은 학습, 단어 수준의 테스트, 트윗 수준의 테스트 각각에서 MySQL의87.8%, 90.37%, 84.85% 수준으로 더 짧게 걸렸는데, 이것은 MongoDB에서 레코드들이 단일의 문서로 저장되고 인출되기 때문인 것으로 판단된다. 더 많은 단어가 종자 어휘에 들어 있을수록 분류기가 레코드를 읽는데 소요되는 시간이 더 길어지게 된다는 점에서 볼때, 어휘기반접근법 (LBA: Lexicon-based Approach)에서는 분류기가 알고리즘의 처리를 위해서 보다 고사양의 계산능력을 요구하게 된다. 쓰기 작업과 관련해서도 MongoDB가 학습, 단어 수준의 테스트, 트윗 수준의 테스트 각각에서 MySQL의 31.0%, 90.1%, 68.5% 수준으로 더 빨랐는데, 이것은 MongoDB가 스키마가 없는 구성을 통해 데이터베이스 요소를 사전에 갱신할 필요없이 사용자에게 데이터 모델을 보다 쉽게 동적으로 변경할 수 있도록 하는 장점 때문인 것으로 판단된다. 뿐만 아니라 MongoDB는 중첩된 문서 구조를 사용하여 외래키 생성이 필요하지 않기 때문에, 많은 쓰기 연산이 수행되는 대용량의 데이터를 처리하기 위한 저장 시스템으로 매우 높게 추천된다.
이렇게 확장된 어휘들은 소셜미디어 텍스트에서 사용되는 비공식적 표현들의 다양성과 희박성 (sparseness)을 극복할 수 있다는 점에서 많은 응용분야에 활용될 수 있다. 생성된 감성 어휘들의 효과성은 지속적인 학습을 통해 새로운 단어와 이들의 감성 영역을 추가함으로서 크게 개선될 수 있을 것이다.
Keywords: 어휘, 감성분석, 감정, 데이터마이닝, 소셜미디어 텍스트, 트위터, MongoDB, MySQL.
The applications of sentiment analysis (SA) on social media texts have received much attention in the public and commercial sectors. But, due to the limitations of general lexicons as resources for evaluating the sentiment of a text passage, conventional researches have suffered from inadequate results and context-ignorant analysis. To overcome such drawbacks, this study proposes a sentiment analysis framework that enhances lexicon generation on social media. A pilot implementation of the proposed framework is developed for Twitter while incorporating heterogeneous datatypes to better generate lexicon. This framework generates an automated word-emotion lexicon on Twitter by searching relations between words and tweets at word-level and tweet-level. The dictionary and corpus-based approaches are utilized to classify words and tweets into seven sentiment polarities while applying the linguistic features like ‘and, but, or’. The sentiment scoring is obtained from the term/word frequency by calculating the means of occurrence for the seven sentiment polarities. The probability of occurrence of each polarity is equally likely. In this regard, this study will attempt to get the dominant sentiment at the topic level. The effectiveness of the sentiment classification related to health, technology, and education topic is tested. It was found that neutral words are the most frequent words in all topics.
The results reveal that the accuracy, precision, recall, and F-measure of the sentiment classification are 96.93%, 97.09%, 99.67%, and 97.96% respectively at the testing word level. Meanwhile, the results obtained at the tweet level are slightly lower for the accuracy (86.3%), precision (86.8%), recall (95%), and F-measure (90.7%). The accuracy and precision rates are higher at the word-level than at the tweet-level by identifying an association between candidate words and seed words.
MySQL and MongoDB databases are used to process data functionalities of the system developed in this study. The operating performance of these two storage systems is assessed at the pre-processing, processing, and evaluation stages within this framework. The findings reveal that MySQL is slower in comparison to MongoDB when dealing with large and unstructured data. MongoDB performs the write operations better than the read operations due to its flexibility in the document schema. The reading time of MongoDB is shorter for executing the queries than that of MySQL by 87.8%, 90.37%, and 84.85% in the lexicon adoption process, testing at the word level, and tweet level respectively because the records are stored and retrieved as a single document in MongoDB. It goes without saying that the more words exist in the seed lexicon, the longer the classifier reads the records. Therefore, the LBA (Lexicon-based Approach) is in needs of higher computing requirements for the classifier to process the algorithm. As for the write operation, MongoDB is also faster than MySQL by 31.0%, 90.4%, and 68.5% in the lexicon adoption process, testing at word and tweet levels respectively because MongoDB has the advantage of schema-less that allows the users to dynamically change the data models more easily and without having the need to update prior database entries. MongoDB relies on a nested document architecture and does not require a foreign key generation. Hence, MongoDB is highly recommended for the storage system when dealing with massive data that has high write loads.
This expanded lexicon can be applied to many domains due to its ability to overcome the diversity and sparseness of informal expressions used in social media texts. The effectiveness of the generated sentiment lexicon can be greatly improved should one continuously train it and expand the seed lexicon by adding more new words and their sentiment polarities.
Keywords: Lexicon, Sentiment Analysis, Emotion, Data mining, Social Media texts, Twitter, MongoDB, MySQL.
- Author(s)
- Liza Wikarsa
- Issued Date
- 2019
- Awarded Date
- 2019. 8
- Type
- Dissertation
- Keyword
- Lexicon Sentiment Analysis Emotion Data mining Social Media texts Twitter MongoDB MySQL.
- Publisher
- 부경대학교
- URI
- https://repository.pknu.ac.kr:8443/handle/2021.oak/23646
http://pknu.dcollection.net/common/orgView/200000221420
- Affiliation
- 부경대학교 기술경영전문대학원
- Department
- 기술경영전문대학원 기술경영학과
- Advisor
- Min-soo Kim
- Table Of Contents
- I. INTRODUCTION 1
1.1 Research Background 1
1.2 Research Question 6
1.3 Research Objectives 6
1.4 Research Contributions 6
1.5 Organizations of this Research Report 7
II. Related Works 8
2.1 Sentiment Analysis 8
2.2 Lexicon-based Approach 10
2.3 Data Types for Social Networking Sites (SNS) 13
2.3.1 Relational Database Management System (RDBMS) 13
2.3.2 Not Only SQL (NoSQL) 14
2.3.3 Sentiment Analysis Framework 26
III. Research Methods 29
3.1 Data Collection 29
3.2 Method Description 30
3.2.1 Stages of the Proposed Framework 30
3.2.2 Sentiment Polarity and Scoring 44
3.3 Database Design 49
IV. Experimental Results and Discussion 53
4.1 System Development 53
4.1.1 Software 53
4.1.2 Hardware 53
4.1.3 Database Implementation 54
4.1.4 Implementation of System Interfaces 57
4.1.5 Functionalities 63
4.2 Experimental Results 79
4.2.1 Stage 1: Pre-processing 79
4.2.2 Stage 2: Processing 80
4.2.3 Stage 3: Evaluation 86
4.3 Comparison of Sentiment Analysis Frameworks 98
4.4 Limitations of the Framework 103
V. Conclusion and Future Direction 105
5.1 Conclusion 105
5.2 Future Direction 108
REFERENCES 110
ACKNOWLEDGEMENTS 116
Appendix-1: List of Python’s Libraries Used in the Development 117
Appendix-2: System Interfaces 120
Appendix-3: Data Models for MySQL and MongoDB 125
Appendix-4: Source Codes 133
- Degree
- Doctor
-
Appears in Collections:
- 기술경영전문대학원 > 기술경영학과
- Authorize & License
-
- Files in This Item:
-
Items in Repository are protected by copyright, with all rights reserved, unless otherwise indicated.