• No results found

Sentiment Clustering with Topic and Temporal Information from Large Email Dataset

N/A
N/A
Protected

Academic year: 2020

Share "Sentiment Clustering with Topic and Temporal Information from Large Email Dataset"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)
(3)

Figure 1: Framework for Email sentiment clustering in topic and temporal categories.

database, a query statement is required for re-trieving the data. The implementation of SQL function DISTINCT and elimination of item with empty “subject” assist in the achievement of this process;

Second step: tokenization. After retrieving the entire dataset from database, tokenizing each Email message through the implementation of tokenize() function for further processing;

Third step: stop word removal and stem-ming. Filtering each Email message using stopAnalyzer() embedded in Apache toolkit re-moves common conjunctions, such as punctua-tion marks and articles, while iterating for stop word removal, simultaneously using stem() function for restoring words’ original format, especially for verb and plural.

3.2 Feature Selection

Since the main aim of this research is to identify the sentiment distribution in accordance with topic and temporal classification, feature selection process is divided into three parts: topic word extraction, timestamp transformation and opinion words gener-ation. Details of each feature category are discussed as follows.

Topic : feature extracted based on keyword search. A list of keywords matching topic category defined is generated manually. Querying column named subject in database returns a string containing sub-ject data of each Email message. A comparison be-tween the string and each keyword list is conducted for searching the corresponding category.

Timestamp : feature is generated through query-ing column named data in the database. Func-tionsgetTime() andgetTimeZone() are implemented for converting temporal data into milliseconds with standard UTC timezone. For instance, date value “2016-04-02 11:12:28” is transformed into “1459559492612”.

Opinion words : features identified on the ba-sis of a well-defined English opinion lexicon (Liu et al., 2004) contain 2,046 positive words and phases, and 4,833 negative words and phases. Let

OW be a collection of entire opinion lexicon, containing word ow1, ow2, . . . , owi, then OW =

{ow1, ow2,· · ·, owi} i (6,879). Sample posi-tive and negaposi-tive words chosen from the lexicon are shown in Table 1.

Positive Words Negative Words

good bad

thank disgrace

worthy overwhelm

flourishing incomplete

delight sick

Table 1: Positive and negative words representation from the English opinion words list (Liu et al., 2004).

(4)

< id, T opic, T imestamp,[ow1, ow2, ow3, ow4]>

3.3 Sentiment Clustering

Sentiment clustering is composed of two steps: grouping data based on timestamp and clustering sentiment based on topic. First step aims at cluster-ing the entire dataset into different date categories with day and week labels using personalized Email temporal clustering algorithm. Second step clusters sentiment using DBSCAN clustering algorithm with bag-of-words term weighting method and Euclidean distance matrix in accordance with topic.

3.3.1 Grouping Data based on Timestamp To investigate the Email distribution, an Email temporal clustering algorithm is applied to group Email messages into days under week category. The Calendarobject embedded in Java is utilized for the comparison of timestamp with calendar and clas-sification into day of the week. The pseudo code forEmailTCalgorithm is presented in Algorithm 1. Due to the characteristics of Calendar object, the first day of week is defined as Sunday. Hence, the classification results start with day 1 representing Sunday and end with day 7 representing Saturday.

3.3.2 Clustering Sentiments based on Topic Revised DBSCAN algorithm (Ester et al., 1996) with bag-of-words term weighting scheme (see Equation 1) and Euclidean distance (see Equation 2) as distance matrix are implemented for conduct-ing the clusterconduct-ing process. Bag-of-words model and Euclidean distance, though invented for decades, re-main efficient and well-adopted in many studies.

BOW =freqeuncyowi, i∈OWp. (1)

Eu(d) =(xs−xt)2+ (ys−yt)2s, t∈(1, n). (2) In Equation 1, supposingOWp represents a col-lection of all positive opinion words, bag-of-words approach computes the frequency of each positive wordowi appeared. Herein, Equation 2 calculates

4: Get week of year;

5: Get day of week;

6: Create groupGwfor week of year;

7: Create groupGdfor day of week;

8: ifT ∈/ Gw then

9: Create subgroupGsubw;

10: PuteiinGsubw;

11: PuteiinGd;

12: else

13: PuteiinGw;

14: ifT ∈Gdthen

15: PuteiinGd;

16: end if

17: end if

18: end for

the distance between positive words and negative words contained in each Email message.

As for the option of DBSCAN, its ability of noise handling and fast processing speed increases the uti-lization of DBSCAN in various applications (Ester et al., 1996). Furthermore, as DBSCAN follows the rule of density-reachablility based on minP tsand

epsilonparameters defined, it generates diversified number of clusters in accordance with different sen-timent scaling. The pseudo code for revised DB-SCAN algorithm is presented in Algorithm 2.

Note that as Ester et al. (1996)’s DBSCAN algo-rithm served as the foundation of the revised version in this paper, more details can be referred to (Ester et al., 1996), especially for the expandCluster() that has not been written out in the pseudo code due to its complexity. By changing the two parameters

minP tsand epsilon, clustering results are varied accordingly (see Algorithm 2). Therefore, imple-mentation of DBSCAN without accurate minP ts andepsilon normally involves trial and error test-ing (Ester et al., 1996).

4

Empirical Results and Discussion

(5)
(6)

Figure 4: The distribution of Email clusters in temporal category.

lowing section.

4.3 Sentiment and Topic Clustering Results

As discussed in the previous section, sentiments are broadly categorized into five scales in accor-dance with the ratio of positive words and negative words. Since the research mainly focuses on find-ing distribution and patterns among sentiment clus-ters with topic and temporal information, accuracy

of clustering results is not evaluated. The following two tables, Table 2 and Table 3, are generated using part of clustering results in week 4.

Due to the limitation of paper length, the above Table 2 summarizes some of the prominent cluster-ing results with topic feature in each day. SP, P,

(7)

Day Topic in sentiment clusters Monday Other-SP

Private Issue-SP

Commercial/Advertising-SP Company Strategy-SP General Operation-P Logistic Issue-NEUTRAL Other-SN

Tuesday Private Issue-SP Other-SP

Company Strategy-SP Logistic Issue-SP Other-P

General Operation-P Logistic Issue-NEUTRAL Other-SN

Wednesday Employee Training-SP Business Investment-SP Company Strategy-SP Company Project-SP Logistic Issue-SP Other-P

General Operation-P Other-SN

Thursday General Operation-SP Other-SP

Employment Arrangement-SP Other-N

Other-SN

Friday General Operation-SP General Operation-P

News/Press/Media-NEUTRAL Other-NEUTRAL

Other-SN

Table 2: Sentiment clustering results in topic category in week 4.

with sentiments in that day. It appears that more pos-itive clusters are discovered with various topics than negative clusters. Interestingly, some topics have both positive and negative clusters which indicates people’s different views on the same topic that is co-herent with human nature. Table 3 shows the corre-sponding items in some of the cluster.

The combination of two tables assists in the fur-ther justification of the option of DBSCAN input

pa-rameters and the sentiment result criteria. On one hand, objects are relevant in the corresponding clus-ter, while distinguished from others. For instance, Emails with more positive features are categorized into positive clusters, such as messageid73677 and messageid54522; while Emails with more negative features are categorized into negative clusters, such as messageid141463 and messageid180199. On the other hand, objects with different feature words are categorized into one cluster indicating a reason-able option of theminP tsparameter.

As an auxiliary to view the sentiments in details rather than a 5 likert scale, two tag cloud graphs (see Fig. 5 and Fig. 6) containing 100 positive and neg-ative words and a table with 20 most frequently re-ferred opinion words are displayed.

Positive Frequency Negative Frequency

work 6767 issue 6896

support 3634 problem 3011 master 2448 limited 2865

thank 2207 risk 2818

lead 1762 crisis 2250

important 1489 concerns 2204 privileged 1277 vice 1763

respect 1262 error 1761

recommend 1220 debt 1410

helpful 1083 critical 1273

Table 4: Top 10 frequent opinion words.

Figure 5: Tag cloud for positive opinion words.

(8)

47679:Other-[free]

73677:Other-[available, good, significant]

80082:Other-[love]

103142:Other-[excel]

103148:Other-[diligence, soft]

Cluster 2: 24721:Employment Arrangement-[like, thank] (Employment Arrangement-SP) 33181:Employment Arrangement-[well, happy]

54522:Employment Arrangement-[encouragement]

80114:Employment Arrangement-[well, good]

180206:Employment Arrangement-[works]

Cluster 3: 120803:Other-[-curt]

(Other-SN) 121264:Other-[-curt]

141463:Other-[-miss, -miss, -miss]

164561:Other-[-liars]

164563:Other-[-hells]

180199:Other-[-hedge, -issues, -hedge, -subjected]

Table 3: Objects in sentiment clusters on topic category in week 4.

Figure 6: Tag cloud for negative opinion words.

negative words are nouns, while most positive words adjectives. Conclusion is to be summarized until more findings are discovered. However, a potential topic is developed for future study.

5

Conclusion and Future Work

In this research paper, we propose a robust and comprehensive framework for sentiment clustering with topic and temporal features using bag-of-words model as term weighting approach and revised DB-SCAN algorithm for clustering. Features composed

of topic, timestamp and opinion words are extracted for performing two experiments, including grouping Email messages into temporal categories and clus-tering sentiments based on topic, for discovering sentiment patterns.

(9)

References

M. Basavaraju and Dr. R. Prabhakar. 2010. A novel method of spam mail detection using text based clus-tering approach. International Journal of Computer Applications, 5(4):15–25.

Nicholas Diakopoulos, Mor Naaman, and Funda Kivran-Swaine. 2010. Diamonds in the rough: Social me-dia visual analytics for journalistic inquiry. InVisual Analytics Science and Technology (VAST), 2010 IEEE Symposium on, pages 115–122. IEEE.

Martin Ester, Hans-Peter Kriegel, J¨org Sander, and Xi-aowei Xu. 1996. A density-based algorithm for dis-covering clusters in large spatial databases with noise. InKdd, volume 96, pages 226–231.

Ronen Feldman. 2013. Techniques and applications for sentiment analysis. Communications of the ACM, 56(4):82–89.

Tomohiro Fukuhara, Hiroshi Nakagawa, and Toyoaki Nishida. 2007. Understanding sentiment of people from news articles: Temporal sentiment analysis of so-cial events. InICWSM.

Sudheendra Hangal, Monica S Lam, and Jeffrey Heer. 2011. Muse: reviving memories using email archives. InProceedings of the 24th annual ACM symposium on User interface software and technology, pages 75–84. ACM.

Ming C Hao, Christian Rohrdantz, Halldor Janetzko, Daniel A Keim, Umeshwar Dayal, Lars erik Haug, Meichun Hsu, and Florian Stoffel. 2013. Visual senti-ment analysis of customer feedback streams using geo-temporal term associations.Information Visualization, page 1473871613481691.

Erik Hatcher and Otis Gospodnetic. 2004. Lucene in action.

Gang Li and Fei Liu. 2012. Application of a clustering method on sentiment analysis. Journal of Information Science, 38(2):127–139.

Sisi Liu and Ickjai Lee. 2015. A hybrid sentiment analy-sis framework for large email data. InIntelligent Sys-tems and Knowledge Engineering (ISKE), 2015 10th International Conference on, pages 324–330. IEEE. Bing Liu, Xiaoli Li, Wee Sun Lee, and Philip S Yu. 2004.

Text classification by labeling words. InAAAI, vol-ume 4, pages 425–430.

Bing Liu. 2015. Sentiment analysis: Mining opin-ions, sentiments, and emotions. Cambridge University Press.

Qiaozhu Mei, Xu Ling, Matthew Wondra, Hang Su, and ChengXiang Zhai. 2007. Topic sentiment mixture: modeling facets and opinions in weblogs. In Pro-ceedings of the 16th international conference on World Wide Web, pages 171–180. ACM.

Alvaro Ortigosa, Jos´e M Mart´ın, and Rosa M Carro. 2014. Sentiment analysis in facebook and its appli-cation to e-learning. Computers in Human Behavior, 31:527–541.

Kumar Ravi and Vadlamani Ravi. 2015. A survey on opinion mining and sentiment analysis: Tasks, ap-proaches and applications. Knowledge-Based Sys-tems, 89:14 – 46.

Hassan Saif, Yulan He, and Harith Alani. 2012. Seman-tic sentiment analysis of twitter. InThe Semantic Web– ISWC 2012, pages 508–524. Springer.

Jasmina Smailovi´c, Miha Grˇcar, Nada Lavraˇc, and Mar-tin ˇZnidarˇsiˇc. 2013. Predictive sentiment anal-ysis of tweets: A stock market application. In Human-Computer Interaction and Knowledge Discov-ery in Complex, Unstructured, Big Data, pages 77–88. Springer.

Guanting Tang, Jian Pei, and Wo-Shun Luk. 2014. Email mining: tasks, common techniques, and tools. Knowl-edge and Information Systems, 41(1):1–31.

Steve Whittaker and Candace Sidner. 1996. Email over-load: exploring personal information management of email. InProceedings of the SIGCHI conference on Human factors in computing systems, pages 276–283. ACM.

Figure

Figure 1: Framework for Email sentiment clustering in topic and temporal categories.
Figure 2: Fragments of data with feature representations.
Figure 3: The distribution of Email messages in temporal category.
Table 2: Sentiment clustering results in topic category inweek 4.
+2

References

Related documents

This study identi fi ed that military patients were treated for longer in critical care and required more surgical interventions for their amputations.. Despite this, their time to

Clark: Media Will Never Influence Learning, Educational Technology Research and Development Vol. 21–29 • Media are “mere vehicles that deliver instruction but do

Pozna ń Technical University: Informatics Institute, considered as one of the bests in Poland, international successes of the scientific staff and their students, e,g, in

The library provides the following graphical objects: Point, Line, Circle, Oval, Rectangle, Polygon, Text, Entry (for text-based input), and Image.. Various attributes of

rectangular panel system B-H 300 plug-in clip visible side ~68 ~68 98 98 ceiling void C-profile perimeter trim threaded rod M6 expansion bolt M6 clamping bracket Bandraster

HaZardS livEWarE – HardWarE pErSonS at riSK initial riSK lEvEl mitigation rESulting riSK lEvEl Speed/rotor rpm deviations Student / Instructor. 3b Flight Crew Training

This monopulse antenna is based on a dual frequency dual mode rat- race coupler that has been designed by using Composite Right/Left Handed (CRLH) Transmission Lines (TL).. The

Under the addition of formate, H 2 production increased more than 2-fold in BL21 cells with recombinant hydrogenase 1, compared to the culture without formate (bars (e) vs (b),