Võ Tuyết Ngân * Đỗ Thanh Nghị

* Tác giả liên hệ (votuyenngan_toasoanctu@gmail.com)

Abstract

Twitter sentiment analysis aims at classifying the comment into positive or negative sentiment. In this paper, we propose to use the bag-of-words model and the Multinomial Naïve Bayes algorithm for dealing with the sentiment classification task. In the first step, raw data sets are the comments on Twitter collected following topic. It is necessary to perform the preprocessing task, including the special characters of Twitter, continuously repeatable characters, acronyms, slang, emoticons, WordNet, and representation in Bow model. Preprocessing stage provides the large dimensional datasets in which almost values (about 99%) are zero. And then, the data set is stored in the LibSVM format (dim_index: non_zero_value). This strategy is to reduce the memory complexity and also require our new implementation of Multinomial Naïve Bayes (MNB) for dealing with the new data format. Theexperimental results on the data sets show that our implementation of Multinomial Naïve Bayes (MNB) algorithm is very simple and accurate.
Keywords: Text classification, Twitter sentiment analysis, Bag-of-Words-(Bow), Support Vector Machines (SVM), Multinomial Naïve Bayes (MNB), WordNet

Tóm tắt

Phân loại ý kiến trên Twitter là phân loại cho từng bình luận theo hướng quan điểm tích cực hay tiêu cực dựa trên nội dung bình luận. Trong bài viết này, chúng tôi đề xuất sử dụng mô hình túi từ và giải thuật máy học Multinomial Naïve Bayes để phân loại ý kiến. Ở bước đầu tiên, từ tập dữ liệu thô là những ý kiến trên Twitter được thu thập theo chủ đề, chúng tôi tiến hành tiền xử lý các kí tự đặc biệt của Twitter, các kí tự trùng lặp gần nhau, từ viết tắt, tiếng lóng, biểu tượng cảm xúc, mạng ngữ nghĩa, biểu diễn văn bản theo mô hình túi từ. Giai đoạn tiền xử lý cho ra tập dữ liệu có số chiều lớn, nhưng trong đó đa số (khoảng 99%) các giá trị bằng 0. Để tiết kiệm bộ nhớ, chiến lược lưu trữ chỉ lưu những giá trị khác 0 (theo định dạng LibSVM). Cách lưu trữ này dẫn đến yêu cầu cài đặt lại giải thuật máy học Multinomial Naïve Bayes để có thể xử lý định dạng mới của tập dữ liệu. Kết quả thực nghiệm trên các tập dữ liệu cho thấy bản cài đặt mới của giải thuật Multinomial Naïve Bayes (MNB) phân lớp hiệu quả, đơn giản và chính xác.  
Từ khóa: Phân loại văn bản, phân loại ý kiến, mô hình túi từ Bow, máy học vectơ hỗ trợ SVM, giải thuật Naïve Bayes, mạng ngữ nghĩa

Article Details

Tài liệu tham khảo

Đỗ Thanh Nghị (2011), “Phân loại thư rác với giải thuật ARCX4-rMNB”. Kỷ yếu hội thảo @CNTT – Một số vấn đề chọn lọc của công nghệ thông tin và truyền thông, pp.427-437.

Đỗ Thanh Nghị và Phạm Nguyên Khang (2012), Nguyên lý máy học, NXB Đại học Cần Thơ, Cần Thơ.

Trần Kim Ngọc (2012), Phân lớp dữ liệu văn bản lớn dựa trên mô hình túi từ và giải thuật máy học vectơ hỗ trợ SVM, luận văn thạc sĩ, Trường Đại học Cần Thơ.

Adam Bermingham and Alan F. Smeaton. (2010), “Classifying sentiment in microblogs: is brevity an advantage?”. In Proceedings of the 19th ACM international conference on Information and knowledge management (CIKM '10). ACM, New York, NY, USA, pp. 1833-1836.

Bifer, A. and Frank, E. (2010), “Sentiment knowledge discovery in twitter streaming data”, Proceeding of the 13th international conference on Discovery science, pp. 1-15.

Chang, C. and Lin, C-J. (2011). LIBSVM: A library for support vector machines. Software available at <http://www.csie.ntu.edu.tw/~cjlin/libsvm>

Go, A., Bhayani, R. and Huang, L. (2009), “Twitter Sentiment Classification using Distant Supervision Technical report”.

Huifeng Tang, Songbo Tan, and Xueqi Cheng (2009), “A survey on sentiment detection of reviews”, Expert Syst. Appl. 36, 7 (September 2009), 10760-10773. DOI=10.1016/j.eswa.2009.02.063

Lewis, D. and Gale, W (1994), “A sequential algorithm for training test classifiers”. In proc, of SIGIR-94.

McCallum, A. (1998). Bow: A Toolkit for Statistical Language Modeling. Text Retrieval, Classification and Clustering. <http://www2/cs.cmu.edu/~mccallum/bow>

Pang, B., Lee, L. and Vaithyanathan, S. (2002). “Thumbs up?: sentiment classification using machine learning techniques”, Proceedings of the ACL-02 conference on Empirical methods in natural language processing, Vol.10, pp. 79-86.

Peter Turney (2002), “Thumbs up or thumbs down? Semantic orientation applied to unsupervised classification of reviews”. Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (ACL-02). Jun. 2002, Philadelphia, PN, USA, pp.417–424.