Social Context and User Profiles of Linguistic Variation on a Micro Scale (2022)

Abstract: This paper presents a new tweet-based approach in geolinguistic analysis which combines geolocation, user IDs and textual features in order to identify patterns of linguistic variation on a sub-city scale. Sub-city variations can be connected to social drivers and thus open new opportunities for understanding the mechanisms of language variation and change. However, measuring linguistic variation on these scales is challenging due to the lack of highly-spatially-resolved data as well as to the daily movement or users’ “mobility” inside cities which can obscure the relation between the social context and linguistic variation. Here we demonstrate how combining geolocation with user IDs and textual analysis of tweets can yield information about the linguistic profiles of the users, the social context associated with specific locations and their connection to linguistic variation. We apply our methodology to analyze dialects in Buenos Aires and find evidence of socially-driven variation. Our methods will contribute to the identification of sociolinguistic patterns inside cities, which are valuable in social sciences and social services.

## introduction analysis of spatial patterns of linguistic variation is an important tool, not only for studying the dynamics of language change, but also as a probe of social dynamics which can be encoded in linguistic variation. the advent of social media and the growth of computational linguistic tools has created many opportunities for extending analysis of linguistic variation in new regimes. one in particular is the study of spatial or geographical patterns of linguistic varieties. until now, most studies in this field have been limited to large scales of geographical analysis, from cities to countries (e.g., @xcite @xcite @xcite . however, urban dynamics, where social interaction and mixing occur, play an important role in language variation and also provide a window into linguistic variation on an urban scale @xcite . urban-scale analyses have been previously used to study the relation between urban location and language choice in multilingual cities @xcite . however, these studies focus on different languages and not on linguistic varieties of the same language. here we explore the use of twitter data with precise geolocation information to map out patterns in the use of two linguistic variants (i.e., dialects) within the city of buenos aires, in order to get deeper insights into the relation between language use and urban structure. our basic approach is to combine analysis of tweet metadata with analysis of tweet texts to first show that a large fraction of users in caba is bi-dialectal (i.e., tweet in both variants) and then to determine how social context influences which dialect is used. bidialectalism is established by exploiting the unique user id metadata to perform linguistic profiling of the users, while the relevant geographical setting is extracted by using the precise gps coordinates to pinpoint the location. the tweet texts then provide information on the associated topics of discussion which helps to complete the social-context picture. our work shows that combining social and geographical aspects of linguistic analysis, made possible by social-media data sources, opens new ## identification of the dialects we selected two spanish varieties: argentinian spanish (argsp) and standard spanish (pansp). these varieties are marked by the variation in the 2 nd person singular pronoun (i.e., vos 'you' in informal address in argsp and tú 'you' in pansp) together with the corresponding verbs that agree with the pronoun (e.g., vos podés vs. tú puedes 'you can') (fontanella de weinberg 1999). we use geolocated tweets in spanish limited to greater buenos aires (caba), i.e., the city of buenos aires and its close surroundings, from october 2017 to march 2021 @xcite . the selection of this city is motivated in §3. we use a token-based analysis method to extract the two linguistic variants @xcite @xcite . this method is a classical method in social dialectology @xcite . for clarity, we here refer to the spanish varieties argsp and pansp as spanish dialects. however, since these varieties can be used by the same group of people under different social circumstances, as we will show in §4, one can also refer to them as sociolects. a priority was placed on ensuring accuracy of the dialect definitions. the token sets were designed to be balanced, so that for each token of argsp, there was a corresponding token with the same meaning in the set representing pansp @xcite . our grammatical token set consists of the most frequent tokens used in argentina according to the corpus corpus del español, which is one of the biggest spanish corpora. 1 we excluded all ambiguous tokens (e.g., argsp seguí 'follow!', which corresponds to pansp sigue 'follow!', but also to 'he/she/it follows' in both dialects). finally, we take special measures to account for differences in how people use accents in social media and standard language @xcite . in particular, accents in tweets are frequently omitted @xcite . we therefore included both accented and unaccented versions of all verbs but excluded those verbs where eliminating the accent results in an ambiguity in assigning the dialect (e.g., argsp sabés vs. pansp sabes). the remaining verbs were distinguishable by the verb stem (e.g., argsp tenés vs. pansp tienes). our final token list contained 235 tokens for argsp and 198 tokens for pansp dialect @xcite . ## background on the dialects a little background on the dialects will help us to evaluate the results. the dialects argsp and pansp have well-known and distinct historical and sociolinguistic roles in caba (fontanella de weinberg 1999). argsp is the most prominent and is also the standard dialect in argentina, paraguay, uruguay and central america (ibid.). pansp, on the other hand, is a variety that is very prominent elsewhere in the spanish-speaking world. this distinction between the two varieties has previously been reported on the basis of geolocated tweets collected in 2016 @xcite , and here we confirm it using our tweet corpus by mapping out the differential distribution of the two tweet varieties on the world scale (see figure 1 ). despite the predominance of argsp in argentina and caba on the world scale, a closer inspection shows significant presence of both varieties within caba @xcite ) which is to be expected for several reasons. first, pansp is the spanish variety that is used by mass media in latin america and consequently also in caba @xcite . second, pansp is used by tourists from pansp speaking countries. and third, pansp was long the standard variety in caba and argentina, before argsp took over this role in the late 19 th c. (fontanella de weinberg 1999). pansp still exists in caba as a substandard variety due to the region's history (ibid). ## detailed methodology and results our analysis, which is based on calculation of the spatial variations in the use of argsp and pansp across the city, is done in three steps. first, the prevalence of the two dialects and the degree of bidialectalism are quantified. the presence of bidialectalism in caba offers the opportunity to directly evaluate how social circumstances influence linguistic variation, since bi-dialectal users can choose when to use each variant. second, regions where each dialect is most prominent are evaluated to look for correlations between social context and tweet content. and third, locations expected to have specific social functions (e.g., soccer stadiums) are evaluated to look for prominence of one or the other dialect. ## discussion the three analyses presented show ways in which different elements of the tweets can be combined to extract valuable information about the user's linguistic behavior and about relevant geographical and social contexts that can influence this behavior. the ability to connect multiple tweets to individual users via the user id is a powerful tool enabling determination of user attributes such as bi-dialectalism which are unavailable via textual analysis alone. similarly, the presence of precise gps coordinates allows connections to be made between text and local geographical features that can be used to characterize the associated social contexts. in the work presented here, although evidence of a pattern is present, some analysis was done manually, leading to small data sets and low statistical significance. development of algorithms to detect geocontext features and characterize tweet content would allow automation of bin analysis, greatly increasing the statistics and hence the strength of the approach. several other important issues must also be considered in going forward. first, despite the large size of our twitter corpus (1.9m geolocated tweets), the quantity of data was a limiting factor for analyzing the small scales. considering a binning of 100 x 100, one can expect only 190 tweets per bin, on average. of course, due to spatial variations in population density, the number of tweets in the city center are far higher than those on the outskirts. data scarcity is aggravated by the small fraction (~1%) of tweets for which the variants could be identified. methods to improve variant identification are thus highly relevant. for instance, the number of tokens (and hence the number of collected tweets) could likely be increased by using a morphological tagger such as freelin 4 . however, since precise identification of the variants was our top priority, we opted for a manually-crafted set of tokens for which the lack of ambiguity could be verified. second, the social context within the bins may not be uniform. for instance, in analysis 3, the starbucks cafes represented only one of several buildings within the bins and therefore may not have been representative of the overall social context. by contrast, soccer stadiums, which are much larger, are more likely to fill an entire bin, thus providing a uniform social context. this increased context uniformity may partially account for the strong correlation observed between soccer stadiums and argsp dialect in figure 3 , bottom left. larger bins tend to encompass a greater diversity of social contexts lessening the degree of correlation between the chosen context and the prevalence of specific linguistic features. on the other hand, smaller bins tend to suffer from insufficient numbers of tweets, requiring optimization of the bin size. a similar problem arises, due to the lack of altitude information in most social-media gps coordinates, when the bins contain multi-story buildings with different businesses on each floor. the work presented here represents only a first step in the application of this methodology. many opportunities exist for future work, including use of tweet-selection methods that do not rely on specific tokens @xcite and expansion of the range of social contexts considered. these tools hold great promise to provide insights into the 4 https://nlp.lsi.upc.edu/freeling/ relation between language use and social dynamics, especially on small spatial scales.