Enhancing Sentiment Analysis on Twitter Using Community Detection


The increasing popularity of social media in recent years has created new opportunities to study the interactions of different groups of people. Never before have so many data about such a large number of individuals been readily available for analysis. Two popular topics in the study of social networks are community detection and sentiment analysis. Community detection seeks to find groups of associated individuals within networks, and sentiment analysis attempts to determine how individuals are feeling. While these are generally treated as separate issues, this study takes an integrative approach and uses community detection output to enable community-level sentiment analysis. Community detection is performed using the Walktrap algorithm on a network of Twitter users associated with Microsoft Corporation’s @technet account. This Twitter account is one of several used by Microsoft Corporation primarily for communicating with information technology professionals. Once community detection is finished, sentiment in the tweets produced by each of the communities detected in this network is analyzed based on word sentiment scores from the well-known SentiWordNet lexicon. The combination of sentiment analysis with community detection permits multilevel exploration of sentiment information within the @technet network, and demonstrates the power of combining these two techniques.

Share and Cite:

W. Deitrick, B. Valyou, W. Jones, J. Timian and W. Hu, "Enhancing Sentiment Analysis on Twitter Using Community Detection," Communications and Network, Vol. 5 No. 3, 2013, pp. 192-197. doi: 10.4236/cn.2013.53022.

Conflicts of Interest

The authors declare no conflicts of interest.


[1] S. Wasserman and K. Faust, “Social Network Analysis,” Cambridge University Press, Cambridgem, 1994. doi:10.1017/CBO9780511815478
[2] N. Gulbahce and S. Lehmann, “The Art of Community Detection,” BioEssays, Vol. 30, No. 10, 2008, pp. 934-938.
[3] S. Fortunato, “Community Detection in Graphs,” Physics Reports, Vol. 486, No. 5-6, 2010, pp. 75-174. doi:10.1016/j.physrep.2009.11.002
[4] M. Girvan and M. Newman, “Community Structure in Social and Biological Networks,” Proceedings of the National Academy of Sciences, Vol. 99, No. 12, 2002, pp. 7821-7826. doi:10.1073/pnas.122653799
[5] M. Porter, J. Onnela and P. Mucha, “Communities in Networks,” Notices of the American Mathematical Society, Vol. 56, No. 9, 2009, pp. 1082-1097, 1164-1166.
[6] H. Assael and J. Keon, “Nonsampling vs. Sampling Errors in Survey Research,” Journal of Marketing, Vol. 46, No. 2, 1982, p. 114.
[7] B. Liu, “Sentiment Analysis and Subjectivity,” Handbook of Natural Language Processing, 2nd Edition, CRC Press, New York, 2010.
[8] P. Bo and L. Lee, “Opinion Mining and Sentiment Analysis,” Foundations and Trends in Information Retrieval, Vol. 46, No. 1-2, 2008, pp. 1-135. doi:10.1561/1500000011
[9] B. O’Connor, R. Balasubramanyan, B. Routledge and N. Smith, “From Tweets to Polls: Linking Text Sentiment to Public Opinion Time Series,” Proceedings of the 4th International AAAI Conference on Weblogs and Social Media, Menlo Park, 2010, pp. 122-129.
[10] S. Tan and J. Zhang, “An Empirical Study of Sentiment Analysis for Chinese Documents,” Expert Systems with Applications, Vol. 34, No. 4, 2008, pp. 2633-2629. doi:10.1016/j.eswa.2007.05.028
[11] P. Pons and M. Latapy, “Computing Communities in Large Networks Using Random Walks,” Journal of Graph Algorithms and Applications, Vol. 10, No. 2, 2006, pp. 191-218. doi:10.7155/jgaa.00124

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.