Interactive Analysis and Visualisation of Annotated Collocations in S panish ( AVA n CES ) (2022)

Abstract: Phraseology studies have been enhanced by Corpus Linguistics, which has become an interdisciplinary field where current technologies play an important role in its development. Computational tools have been implemented in the last decades with positive results on the identification of phrases in different languages. One specific technology that has impacted these studies is social media. As researchers, we have turned our attention to collecting data from these platforms, which comes with great advantages and its own challenges. One of the challenges is the way we design and build corpora relevant to the questions emerging in this type of language expression. This has been approached from different angles, but one that has given invaluable outputs is the building of linguistic corpora with the use of online web applications. In this paper, we take a multidimensional approach to the collection, design, and deployment of a phraseology corpus for Latin American Spanish from Twitter data, extracting features using NLP techniques, and presenting it in an interactive online web application. We expect to contribute to the methodologies used for Corpus Linguistics in the current technological age. Finally, we make this tool publicly available to be used by any researcher interested in the data itself and also on the technological tools developed here.

## introduction advances in current technologies have played a pivotal role in the development of academic fields, such as corpus-based phraseology. one of the most tangible results is the development of corpora based on digitised books @xcite , google books @xcite , and social media @xcite . contributions from corpus linguistics have also been invaluable. corpus linguistics has been identified as one of the fastest growing linguistic methods in language studies @xcite . this growth has gone hand in hand with advances in technologies, and it is clearly tangible in the tools that are now available for us as linguistic researchers to create exhaustive corpora to be accessed all around the world (a comprehensive list can be found in tools for corpus linguistics). this has made corpus linguistics strongly dependent on the internet, where many websites have been deployed specifically for this purpose. all these factors render working with linguistic corpora a very interdisciplinary field, combining linguistics, data processing, data visualisation, and app development. another technological development that has influenced corpus-based phraseology has been the birth and development of social media platforms since the early 2000s. with these, we can create corpora that are based on natural language, from text to speech sources. among these social media platforms, twitter is one of the most influential ones and most widely used around the globe for the last two decades. a positive take on this is that twitter offers free apis that can be used to build tools for linguistic purposes. researchers have made positive use of this and have maximised the potential to collect data and use it for language research @xcite @xcite . within the field of computational linguistics, language studies have also found invaluable tools that have positively influenced the way we approach phraseology studies. natural language processing techniques allow us to do a wide range of tasks on a large amount of data in relatively quick time. this has changed the focus from analysing small amounts of data, generally limited to the time human coders could process data, to processing massive amounts of data, where the limit is now on the computational capability. taking these technological contributions, namely social media, and open-source computational tools, we present in this paper the development of an online tool for the querying, analysis, and visualisation of collocations in latin american spanish based on a social media corpus. we discuss the emerging challenges when creating a corpus from social media and propose methodological processes appropriate for building digital language corpora to efficiently analyse collocations. the main motivation is to bring more depth to the presentation and analysis of linguistic patterns in a more interactive way. this type of implementation gives users powerful tools oriented towards finding patterns in available corpora. the final product aims to give researchers full control of the corpus by combining linguistic analysis, natural language processing outputs, and visualisation techniques. with this holistic approach, we offer a deeper understanding of the complexity of collocations through exploration tools. the goal of this research is then to present a new approach to analyse collocations. in this paper, we focus on spanish, but this methodology can be used for any language that has outputs in social media platforms. we apply the analytical framework of network analysis to the study of collocations, and we also look at syntactic relationships and statistical measurements. in this sense, we aim to bridge the gap between the continental tradition @xcite and the british contextualists tradition @xcite @xcite . this paper is organised as follows. in section 2, we present the technologies implemented in a more contextualised way, relevant to our study. we also present related work and our approach to the analysis and app development. we present the methodology in section 3 and the analysis in section 4. the final product is presented in section 5, with the conclusions in section 6. ## background and rationale the development of this new technology is created within three frameworks: social media, computational linguistics, and internet technologies. these are briefly discussed in the next sections below. ## methodology among other computational languages and software available, shiny r @xcite , within r (r core team, 2022), offers an invaluable infrastructure that, if well implemented, can facilitate the integration of the necessary methods mentioned above to produce high quality linguistic corpora. the app developed as part of this study and all its functionality were developed in r, which has been widely used for corpus linguistics development and related tasks @xcite . the main framework was within filter count percentage urls ∼ 10, 000 1.3% re-tweets ∼ 258, 000 35% quote tweets ∼ 60, 000 8% non-spanish tweets ∼ 95, 000 13% less than 10 words ∼ 137, 000 19% ## analysis and visualisation in this paper, we implement an analysis approach driven by visualisations of collocations. the visualisations are based on the mathematical measures done in the data processing stage, for both overall collocations and word-based selections. the driving approach is on network analysis (na), which has been widely implemented in different fields, including causal distribution research @xcite , archaeology @xcite , psychological studies @xcite , and social network research @xcite . the ## final product the final product is an app that gives users the opportunity to explore all the data, and the results from the different analyses. the code and application can be accessed through the github repository: https://github.com/simongonzalez/avances . the app is organised into five main sections. the first one is the visualisation of the distributions of speakers based on countries and occupations in the data. the second section shows the distributions of ngrams and parts of speech through network visualisations, pie charts, and bar plots. the third section presents results from the network analysis, looking at overall and word-based collocations. the fourth section shows the syntactic dependencies plots, and the sentences are selected by the user. the fifth and final section has a searching capability. in this tab, users can search for syntactic patterns in the data. the source tagging comes from the udpipe output, showing the morphosyntactic patterns. the main usability is to allow users to identify in advance the potential sequences that can be relevant to explore in more depth. all these five sections then gather all the pre-processed data and also process the data based on user requests. this gives a full control on the data processing to have sophisticated exploration tools. in this paper, we have presented the development and deployment of a spanish linguistic corpus built from twitter posts. we combined nlp techniques, linguistic analysis, and app development approaches to create a holistic framework to analyse and explore collocations across twitter users from thirteen latin american countries. in future versions of the app, we aim to include more language features, as well as more data from other spanish-speaking countries. we also aim to carry out more linguistic analysis relevant for corpus research, such as language variation, stylistics, sentiment analysis, for example. finally, this is an open-source tool with the potential to be expanded and customised based on user needs.