For additional information about this publication click this link. We experimented with several authorship profiling techniques and various recognition features, using Tweet text only, in order to determine how well they could distinguish between male and female authors of Tweets. We achieved the best results, However, as any collection that is harvested automatically, its usability is reduced by a lack of reliable metadata.
In this case, the Twitter profiles of the authors are available, but these consist of freeform text rather than fixed information fields. And, obviously, it is unknown to which degree the information that is present is true. The resource would become even more useful if we could deduce complete and correct metadata from the various available information sources, such as the provided metadata, user relations, profile photos, and the text of the tweets.
In this paper, we start modestly, by attempting to derive just the gender of the authors 1 automatically, purely on the basis of the content of their tweets, using author profiling techniques. For our experiment, we selected authors for whom we were able to determine with a high degree of certainty a that they were human individuals and b what gender they were.
We also varied the recognition features provided to the techniques, using both character and token n-grams. For all techniques and features, we ran the same 5-fold cross-validation experiments in order to determine how well they could be used to distinguish between male and female authors of tweets. In the following sections, we first present some previous work on gender recognition Section 2.
Then we describe our experimental data and the evaluation method Section 3 , after which we proceed to describe the various author profiling strategies that we investigated Section 4. Then follow the results Section 5 , and Section 6 concludes the paper. For whom we already know that they are an individual person rather than, say, a husband and wife couple or a board of editors for an official Twitterfeed.
Gender Recognition Gender recognition is a subtask in the general field of authorship recognition and profiling, which has reached maturity in the last decades for an overview, see e. Juola and Koppel et al. Currently the field is getting an impulse for further development now that vast data sets of user generated data is becoming available. Narayanan et al. Even so, there are circumstances where outright recognition is not an option, but where one must be content with profiling, i.
In this paper we restrict ourselves to gender recognition, and it is also this aspect we will discuss further in this section. A group which is very active in studying gender recognition among other traits on the basis of text is that around Moshe Koppel. In Koppel et al. For each blogger, metadata is present, including the blogger s self-provided gender, age, industry and astrological sign.
This corpus has been used extensively since. The creators themselves used it for various classification tasks, including gender recognition Koppel et al. They report an overall accuracy of Slightly more information seems to be coming from content However, even style appears to mirror content. We see the women focusing on personal matters, leading to important content words like love and boyfriend, and important style words like I and other personal pronouns.
The men, on the other hand, seem to be more interested in computers, leading to important content words like software and game, and correspondingly more determiners and prepositions. One gets the impression that gender recognition is more sociological than linguistic, showing what women and men were blogging about back in A later study Goswami et al.
The authors do not report the set of slang words, but the non-dictionary words appear to be more related to style than to content, showing that purely linguistic behaviour can contribute information for gender recognition as well. Gender recognition has also already been applied to Tweets. Rao et al. With lexical N-grams, they reached an accuracy of Burger et al. Their highest score when using just text features was Although LIWC appears a very interesting addition, it hardly adds anything to the classification.
With only token unigrams, the recognition accuracy was Bamman et al. They used lexical features, and present a very good breakdown of various word types. When using all user tweets, they reached an accuracy of An interesting observation is that there is a clear class of misclassified users who have a majority of opposite gender users in their social network. When adding more information sources, such as profile fields, they reach an accuracy of Among other things, it shows gender and age statistics for the users producing the tweets found for user specified searches.
These statistics are derived from the users profile information by way of some heuristics. For gender, the system checks the profile for about common male and common female first names, as well as for gender related words, such as father, mother, wife and husband. If no cue is found in a user s profile, no gender is assigned. The age component of the system is described in Nguyen et al. The authors apply logistic and linear regression on counts of token unigrams occurring at least 10 times in their corpus.
The conclusion is not so much, however, that humans are also not perfect at guessing age on the basis of language use, but rather that there is a distinction between the biological and the social identity of authors, and language use is more likely to represent the social one cf. Although we agree with Nguyen et al.
Experimental Data and Evaluation In this section, we first describe the corpus that we used in our experiments Section 3. Then we outline how we evaluated the various strategies Section 3. From this material, we considered all tweets with a date stamp in and In all, there were about 23 million users present. Of these, we only considered the ones who produced 2 to 10 tweets on average per day over and This restriction brought the number of users down to about , We then progressed to the selection of individual users.
We aimed for users. We selected of these so that they get a gender assignment in TwiQS, for comparison, but we also wanted to include unmarked users in case these would be different in nature. All users, obviously, should be individuals, and for each the gender should be clear. From the about , users who are assigned a gender by TwiQS, we took a random selection in such a manner that the volume distribution i.
We checked gender manually for all selected users, mostly on the basis 3. As in our own experiment, this measurement is based on Twitter accounts where the user is known to be a human individual. However, as research shows a higher number of female users in all as well Heil and Piskorski , we do not view this as a problem. From each user s tweets, we removed all retweets, as these did not contain original text by the author.
Then, as several of our features were based on tokens, we tokenized all text samples, using our own specialized tokenizer for tweets. Apart from normal tokens like words, numbers and dates, it is also able to recognize a wide variety of emoticons. The tokenizer is able to identify hashtags and Twitter user names to the extent that these conform to the conventions used in Twitter, i.
URLs and email addresses are not completely covered. The tokenizer counts on clear markers for these, e. Assuming that any sequence including periods is likely to be a URL provesunwise, given that spacing between normal wordsis often irregular. And actually checking the existence of a proposed URL was computationally infeasible for the amount of text we intended to process. Finally, as the use of capitalization and diacritics is quite haphazard in the tweets, the tokenizer strips all words of diacritics and transforms them to lower case.
For those techniques where hyperparameters need to be selected, we used a leave-one-out strategy on the test material. For each test author, we determined the optimal hyperparameter settings with regard to the classification of all other authors in the same part of the corpus, in effect using these as development material. In this way, we derived a classification score for each author without the system having any direct or indirect access to the actual gender of the author.
We then measured for which percentage of the authors in the corpus this score was in agreement with the actual gender. These percentages are presented below in Section 5. Profiling Strategies In this section, we describe the strategies that we investigated for the gender recognition task. As we approached the task from a machine learning viewpoint, we needed to select text features to be provided as input to the machine learning systems, as well as machine learning systems which are to use this input for classification.
We first describe the features we used Section 4. Then we explain how we used the three selected machine learning systems to classify the authors Section 4. The use of syntax or even higher level features is for now impossible as the language use on Twitter deviates too much from standard Dutch, and we have no tools to provide reliable analyses. However, even with purely lexical features, 4. Several errors could be traced back to the fact that the account had moved on to another user since We could have used different dividing strategies, but chose balanced folds in order to give a equal chance to all machine learning techniques, also those that have trouble with unbalanced data.
If, in any application, unbalanced collections are expected, the effects of biases, and corrections for them, will have to be investigated. Most of them rely on the tokenization described above. Top Function Words The most frequent function words see kestemont for an overview. We used the most frequent, as measured on our tweet collection, of which the example tweet contains the words ik, dat, heeft, op, een, voor, and het. Then, we used a set of feature types based on token n-grams, with which we already had previous experience Van Bael and van Halteren For all feature types, we used only those features which were observed with at least 5 authors in our whole collection for skip bigrams 10 authors.
Unigrams Single tokens, similar to the top function words, but then using all tokens instead of a subset. About 47K features. In the example tweet, we find e.
Vrijdag 13st, December 9:28:2 Am
|45 jaar vrouw, Schorpioen|
|Italiaans(Mooi zo), Oekraïens(Basic), Frans(Beginner)|
|Stuur een bericht|