Research on Gender Prediction of Chinese Social Media Users——Taking Sina Weibo Short Text Content as an Example
Received date: 2021-07-05
Online published: 2025-04-28
[Purpose/significance] Different from the rapid development of the Internet, the development of personal information security protection is relatively lagging. By predicting the gender of social media users, it can better provide privacy protection for the users. [Method/process] The short texts posted by users in social media, Sina Weibo, were taken as the research object. The experiment extracted linguistic features and topic features from the short texts. For each user, we constructed features vector based on linguistic features, topic features, and the superposition of two features, then used SVM Machine learning algorithms built a classifier for gender prediction. [Result/conclusion] Experiments show that the linguistic features and topic features can predict the gender of the users accurately, and the effect is superior to other features used in gender prediction.
Key words: short text; gender prediction; topic features; linguistic features
Liu Yaqi , Li Dezhi , Wang Ruixue . Research on Gender Prediction of Chinese Social Media Users——Taking Sina Weibo Short Text Content as an Example[J]. Knowledge Management Forum, 2021 , 6(4) : 213 -227 . DOI: 10.13266/j.issn.2095-5472.2021.021
表1 短文本内容性别预测中使用过的语言特征 |
| D. Rao等[28] | N. Cheng等[34] | Bamman等[36] |
| 表情符号 | 否定词(no,not,never) | 代词(you,u,ur) |
| OMG | 积极的情绪(love,nice) | 情感词语(sad,love) |
| 省略号 | 消极的情绪(hurt,ugly) | 表情符号(:D) |
| 二元词(my_XXX,) | 焦虑(worried,fearful) | 亲属称呼(mom,sister) |
| 重复的字母(niceeeeee) | 愤怒(hate,kill) | 缩写(lol,omg) |
| 自我描述(I_XXX,) | 悲伤(crying,grief) | 同意(okey,yes) |
| 笑(LOL,ROTFL,haha) | 沉思(think,consider) | 否定(no,cannot) |
| 愤怒(Ugh,mmmm) | 疑惑(maybe,perhaps) | 禁语 |
| 赞同(yea,yeah,ohya) | 肯定(always,never) | 介词(a,the,my) |
| 敬语(dude,man,bro,sir) | 禁止(block,stop) | |
| 激动(!!!!) | 同意(agree,OK,yes) | |
| 单个惊叹号(!) | ||
| 困惑(!?!?!) |
表2 不同性别使用词语t的统计数据 |
| 男性 | 女性 | |
| 使用词语t | a | b |
| 未使用词语t | c | d |
表3 每个主题的前10个词 |
| 主题 | 词语 |
| topic 0 | 哈哈、嘻嘻、泪、厉害、猫、表情、好看、哥哥、帅、妹妹、... |
| topic 1 | 新闻、中国、博文、网易、北京、今日头条、阅读、资讯、专访、微信、... |
| topic 2 | 续航、性能、处理器、比亚迪、机型、时速、油耗、变速箱、太阳能、显示器、... |
| topic 3 | 礼物、宝贝、情人节、假期、八月、圣诞、节日、晚安、欢迎、看看、... |
| topic 4 | 手机、红包、领取、签到、抽奖、小米、信息、iPhone、客户端、相册、... |
| topic 5 | 关晓彤、冯小刚、罗志祥、王宝强、陈学冬、邓超、陈赫、李小璐、饰演、孙红雷、... |
| topic 6 | 空间、存储、美团、兴趣、公众、微信、水晶、精力、利用、相位、... |
| topic 7 | 世界杯、苏宁、奥运会、合同、决赛、冠军、NBA、西班牙、俱乐部、詹姆斯、... |
| topic 8 | 技术、学习、效果、训练、能力、专业、个人、项目、挑战、力量、... |
| topic 9 | 成都市、河南省、河北省、深圳市、西安市、开发区、广州市、绵阳、市政府、福建省、... |
| topic 10 | 美拍、分享、视频、音乐、播放、录制、自、YouTube、魔力、NBA、... |
| topic 11 | 智慧、思想、魅力、命运、人才、婚姻、思考、心灵、心态、安全感、... |
| topic 12 | Nike、Party、adidas、运动鞋、配色、Young、Black、Max、Moto、Jordan、... |
| topic 13 | 京东、商城、购买、精心、围观、评价、活动、天猫、支付宝、优惠券、... |
| topic 14 | 生命、爱情、青春、一生、梦想、时光、人类、过程、内心、意义、... |
表4 4种核函数的最优参数及预测效果对比 |
| 评测指标 | 线性核函数(cost=1/32) | 径向基核函数(cost=32,gamma=1/128) | sigmoid核函数(cost=32,coef0=8,gamma=1/16) | 多项式核函数(degree=1,gamma=1/4,coef0=16,cost=16) |
| 精准率 | 0.82 | 0.829 | 0.791 | 0.822 |
| 召回率 | 0.818 | 0.829 | 0.787 | 0.811 |
| F值 | 0.818 | 0.829 | 0.787 | 0.809 |
表5 使用n元语法特征与语言特征构造的向量对比 |
| 使用n元语法模型构造的特征向量 | 使用语言特征构造的特征向量 |
| 0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,... | 0,0,0,7,2,0,0,1,0,0,0,0,11,0,0,0,3,1,2,1,0,0,3,... |
刘雅琦: 实验设计与论文修改;
李得志: 数据收集、实验与部分论文撰写;
王瑞雪: 数据分析与部分论文撰写。
| [1] |
陈传夫,刘雅琦.公共部门信息增值利用中的个人信息保护[J].情报科学,2010,28(10):1455-1460.
|
| [2] |
刘雅琦.公共部门信息增值利用中的个人信息保护立法研究[J].情报理论与实践,2011,34(4):40-43.
|
| [3] |
郑莉,蔡琼,石曼,等.社交网络隐私成本的量化研究[J].科教导刊(电子版),2019(1):282.
|
| [4] |
曹杨.微博用户性别分类研究及应用[D].合肥:安徽大学.2019.
|
| [5] |
熊杰.政务微博在线评论中的用户情绪及行为研究[D].成都:电子科技大学,2020.
|
| [6] |
WALTON S C, RICE R E. Mediated disclosure on Twitter: the roles of gender and identity in boundary impermeability, valence, disclosure, and stage[J]. Computers in human behavior, 2013, 29(4):1465-1474.
|
| [7] |
PIAO G, BRESLIN J G. User modeling on Twitter with WordNet Synsets and DBpedia Concepts for Personalized Recommendations[C]//ACM international conference on information & knowledge management. Indianapolis: ACM, 2016:2057-2060.
|
| [8] |
PAN. Shared tasks[EB/OL].[2021-02-04]. https://pan.webis.de/shared-tasks.html.
|
| [9] |
BIENDATA.比赛项目[EB/OL].[2021-02-04]. https://www.biendata.xyz/competition/.
|
| [10] |
SMITH J. Gender prediction in social media[EB/OL].[2021-02-04]. https://arxiv.org/abs/1407.2147.
|
| [11] |
ABBASI M A, CHAI S K, LIU H, et al. Real-world behavior analysis through a social media lens[C]//International conference on social computing, behavioral-cultural modeling, and prediction. Berlin: Springer, 2012: 18-26.
|
| [12] |
ZHELEVA E, GETOOR L. To join or not to join: the illusion of privacy in social networks with mixed public and private user profiles[C]//Proceedings of the 18th international conference on World Wide Web. 2009: 531-540.
|
| [13] |
SCHWARTZ H A, EICHSTAEDT J C, KERN M L, et al. Personality, gender, and age in the language of social media: the open-vocabulary approach[J]. PloS one, 2013, 8(9): e73791.
|
| [14] |
VICENTE M, BATISTA F, CARVALHO J P. Gender detection of Twitter users based on multiple information sources[M]//Interactions between computational intelligence and mathematics part 2. Cham: Springer, 2019: 39-54.
|
| [15] |
SUN X, WU P, LIU H. Facial age estimation using bio-inspired features and cost-sensitive ordinal hyperplane rank[C]// IEEE, International Conference on Cloud Computing and Intelligence Systems. Shenzhen: IEEE, 2015:81-85.
|
| [16] |
GUO G, MU G, FU Y. Gender from body: a biologically-inspired approach with manifold learning[M]// Computer vision – ACCV 2009. Berlin: Springer, 2009.
|
| [17] |
LANITIS A, TAYLOR C J, COOTES T F. Toward automatic simulation of aging effects on face images[J]. Pattern analysis & machine intelligence IEEE transactions on, 2002, 24(4):442-455.
|
| [18] |
GUNAY A, NABIYEV V V. Automatic age classification with LBP[C]// International symposium on computer and information sciences. Istanbul :IEEE, 2008:1-4.
|
| [19] |
SHAN C. Learning local binary patterns for gender classification on real-world face images[M]. Amsterdam :Elsevier Science Inc. 2012.
|
| [20] |
BALUJA S, ROWLEY H. Boosting sex identification performance[J]. International journal of computer vision, 2007, 71(1):111-119.
|
| [21] |
MANSANET J, ALBIOL A, PAREDES R. Local deep neural networks for gender recognition[M]. Amsterdam: Elsevier Science Inc, 2016.
|
| [22] |
吴泽银. 基于集成卷积神经网络的人脸性别识别研究[D].广州:华南理工大学,2016.
|
| [23] |
BURGER J D, HENDERSON J, KIM G, et al. Discriminating gender on Twitter[C]// Conference on empirical methods in natural language processing. Edinburgh: Association for Computational Linguistics, 2011:1301-1309.
|
| [24] |
ALOWIBDI J S, BUY U A, YU P. Language independent gender classification on Twitter[C]// IEEE/ACM international conference on advances in social networks analysis and mining. Niagara Falls: IEEE, 2013:739-743.
|
| [25] |
钱铁云,尤珍妮,陈丽,等.基于兴趣标签的缄默用户性别预测研究[J].华中科技大学学报(自然科学版),2015,43(12):101-105.
|
| [26] |
LI S, WANG J, ZHOU G, et al. Interactive gender inference with integer linear programming[C]// International joint conference on artificial intelligence. Barcelona: AAAI Press, 2015:2341-2347.
|
| [27] |
戴斌,李寿山,贡正仙,等.基于多类型文本的半监督性别分类方法研究[J].山西大学学报(自然科学版),2017,40(1):14-20.
|
| [28] |
CHENG N, CHANDRAMOULI R, SUBBALAKSHMI K P. Author gender identification from text[J]. Digital investigation, 2012, 8(1):78-88.
|
| [29] |
FILHO J A B L, PASTI R, CASTRO L N D. Gender classification of twitter data based on textual meta-attributes extraction[C]// World conference on information systems and technologies. Switzerland: Springer, 2016:1025-1034.
|
| [30] |
WANG Q, MA S, ZHANG C. Predicting users’ demographic characteristics in a Chinese social media network[J]. The electronic library, 2017,35(4): 758-769.
|
| [31] |
PEERSMAN C, DAELEMANS W, VAERENBERGH L V. Predicting age and gender in online social networks[C]// International CIKM workshop on search and mining user-generated contents. Glasgow:DBLP, 2011:37-44.
|
| [32] |
王晶晶, 李寿山, 黄磊. 中文微博用户性别分类方法研究[J]. 中文信息学报, 2014, 28(6):150-155.
|
| [33] |
MILLER Z, DICKINSON B, HU W. Gender prediction on Twitter using stream algorithms with N-Gram character features[J]. International journal of intelligence science, 2012, 2(4):143-148.
|
| [34] |
RAO D, YAROWSKY D, SHREEVATS A, et al. Classifying latent user attributes in Twitter[C]// International workshop on search and mining user-generated contents. New York: ACM, 2010:37-44.
|
| [35] |
BIENDATA.SMPCUP2016微博用户画像数据[EB/OL]. [2020-10-08].https://www.biendata.xyz/competition/smpcup2016/data/.
|
| [36] |
BAMMAN D, EISENSTEIN J, SCHNOEBELEN T. Gender identity and lexical variation in social media[J]. Journal of sociolinguistics, 2014, 18(2):135–160.
|
| [37] |
BLEI D M, NG A Y, JORDAN M I. Latent Dirichlet allocation[J]. Journal of machine learning research, 2003, 3(3):993-1022.
|
| [38] |
CHEN J, HUANG H, TIAN S, et al. Feature selection for text classification with Naïve Bayes[J]. Expert systems with applications an international journal, 2009, 36(3):5432-5435.
|
| [39] |
GAO R, HAO B, LI H, et al. Developing simplified Chinese psychological linguistic analysis dictionary for Microblog[M]// Brain and health informatics, 2013:359-368.
|
| [40] |
KIM Y. Convolutional neural networks for sentence classification.[EB/OL].[2021-02-04]. https://arxiv.org/abs/1408.5882
|
/
| 〈 |
|
〉 |