T ext BI : An Interactive Dashboard for Visualizing Multidimensional NLP Annotations in Social Media Data (2024)

Abstract: In this paper we introduce TextBI, a multimodal generic dashboard designed to present multidimensional text annotations on large volumes of multilingual social media data. This tool focuses on four core dimensions: spatial, temporal, thematic, and personal, and also supports additional enrichment data such as sentiment and engagement. Multiple visualization modes are offered, including frequency, movement, and association. This dashboard addresses the challenge of facilitating the interpretation of NLP annotations by visualizing them in a user-friendly, interactive interface catering to two categories of users: (1) domain stakeholders and (2) NLP researchers. We conducted experiments within the domain of tourism leveraging data from X (formerly Twitter) and incorporating requirements from tourism offices. Our approach, TextBI, represents a significant advancement in the field of visualizing NLP annotations by integrating and blending features from a variety of Business Intelligence, Geographical Information Systems and NLP tools. A demonstration video is also provided https://youtu.be/x714RKvo9Cg

## introduction in today's data-driven era, the ability to quickly analyze, interpret, and make decisions based on vast amounts of data has become crucial @xcite . this is particularly true for social media platforms, which generate extensive amounts of textual data. natural language processing (nlp) plays a crucial role in transforming unstructured text data, like social media posts, into structured knowledge @xcite . however, the enormous quantity of social media information and the wide range of potential automatic annotations can make it challenging to efficiently extract insights from annotated social media data. consequently, there is a need for tools that can facilitate the inter-1 https://youtu.be/x714rkvo9cg figure 1: textbi's role in the interaction with the nlp pipeline pretation and understanding of automatic annotations within a social media corpus for people who are not necessarily domain-experts. this paper introduces textbi, a generic, multi-modal dashboard that enables comprehensive visualizations of multidimensional annotations extracted from social media (see fig. 1 ). textbi offers a user-friendly and intuitive interface that presents text annotations visually. textbi goes further than existing nlp visualization tools by incorporating interactions, multidimensional combined filtering, and visual synchronization, commonly found in business intelligence (bi) tools. raw multilingual text annotations are converted into interactive visuals, making them more easily understandable thereby facilitating their interpretation. this dashboard operates on four generic dimensions: spatial (location data), temporal (time stamps), thematic (data semantics linked with a domain resource), and personal (user-related data and profiles). furthermore, it supports optional and extensible enrichment data, including sentiment and engagement metrics (e.g., likes, shares). textbi also comes with a generic data model (aps model; @xcite capable of modeling any annotated corpus from social media along the aforementioned dimensions. data collection and nlp must be undertaken before its use to produce an annotated corpus of social media posts. textbi is designed to address the requirements of two distinct categories of users: both categories of users may have different end goals, but there might be common interests in terms of what they want to observe. we believe that both groups are likely to share an interest in identifying frequencies, associations, and sequences of annotations. additionally, they may want to conduct cross-dimensional analyses involving different types of annotations. thus, textbi could meet the requirements for both categories of end-users. previous work on business intelligence (bi; @xcite @xcite , geographical information systems (gis; kurt @xcite and nlp tools @xcite have addressed the visualization of nlp annotations in an independent manner. in this work we take into account previous approaches while also addressing their respective limitations. from bi tools, we borrow the interactive design, user-friendly interfaces, and visual synchronization, adapting these features for their use with annotated text data as opposed to traditional numerical data. we adopt detailed spatial views of gis tools, acknowledging that social media data often contains a spatial aspect. however, unlike traditional gis tools, we aim for a multidimensional approach, not just a spatial one. from nlp tools, we take their analytical strength, such as co-occurrence and frequency analysis, but go beyond their usual focus on text and basic words to include dimensional entities like thematic concepts, locations, and time periods. by merging these elements, textbi aims to provide an inclusive visualization of nlp annotations that benefits both researchers and domain-specific stakeholders. summarizing, we believe that textbi represents a significant advancement in the field of visualizing nlp annotations by integrating and blending features of a variety of tools. in the realm of business intelligence (bi) tools, tableau @xcite , power bi @xcite , and qlikview @xcite are recognized for their ability to empower decision-making processes @xcite via their interactive data exploration and user-friendly dashboards. however, these tools are primarily designed to handle numerical and well-structured data, resulting in significant challenges when working with text data. while certain efforts have been made to incorporate nlp processes into bi tools @xcite , they struggle to present sequential data (e.g., trajectories) and draw connections across text annotations from various dimensions. additionally, these tools lack comprehensive support for multilingual data. when it comes to nlp tools, they can be divided into two main categories. some of them, such as spacy @xcite , textrazor @xcite , gate @xcite , and gensim @xcite , primarily focus on data processing, offering limited visualization capabilities such as word clouds, semantic graphs, and text-based annotation views. other tools, such as iramuteq @xcite , voyant @xcite , vosviewer (van eck and waltman, 2013), and sentimentviz @xcite , offer a broader range of visualization options, but are generally focused on a single dimension (like sentiment) or word-based statistical analyses. however, some of these tools can be challenging for non-computer scientists due to their complexity. ## generic data model the textbi dashboard is based on a data model called the aps model with the aim of modeling in a generic way any kind of annotated social media corpus. this data model consists of 5 dimensions. the class diagram of the data model is shown in fig. 2 . the users and groups dimension allows modeling the studied population: individual users and user groups featuring common characteristics or traits. the trajectory dimension provides the ordered sequence of posts belonging to a given user. it gives a comprehensive view of an user's activities on the chosen social media and allows linking posts together. it can be broken down into several sub-trajectories (spatial, thematic, spatio-thematic, etc.). the token annotation dimension models the posts along with their associated token annotations. a given post can have several token annotations. those can be spatial (toponyms), temporal (temporal entities) or thematic (domain concepts). thematic annotations are resolved according to the studied domain description (domain specific ontology, thesaurus or dictionary). these semantic resources provide additional hierarchy information. when it comes to spatial annotations, those are associated with a unique identifier linked to a spatial database. this allows for places to feature hierarchical relationships (e.g., a city is within a region, itself within a country). the text annotation dimension contains sentiment annotation which models the overall sentiment of the associated post and engagement annotation which models the engagement associated with a given post (based on the number of replies, likes and quotes). the classes for both text and token annotations are designed to be extensible, thereby empowering the end user with the flexibility to incorporate new annotation types as desired. annotations can be instantiated by running nlp modules on the extracted social media posts (e.g., ner, concept extraction) or by parsing post metadata (e.g., engagement metrics, geotags, etc.). lastly, the proxemic distances dimension allows calculating and storing distances across spatial, temporal, thematic or individual entities. such distances can be computed within a unique dimension or through two distinct dimensions. ## annotation setup the first step (see fig. 1 ) in generating our visualization with textbi consists of initializing the data model using an annotated corpus of data tied to a domain-specific knowledge base. in our case, we make use of the thesaurus on tourism and leisure activities @xcite , an extensive multilingual terminology with over 2500 touristic concepts. with respect to the corpus, we collected 3,293 tweets issued by tourists during the summer of 2019 from the social media x (formerly twitter) foot_0 . the data collection approach is outlined in @xcite . the data model was instantiated using two types of data: metadata and tweet content. metadata-based instantiation was a straightforward process, encompassing elements like engagement metrics, profile features, timestamps, and geotags, among others. the textual content of the tweets was processed using three deep learning-based nlp modules to generate automatic annotations at the token level for (1) locations and (2) thematic concepts, and at the text level for (3) sentiment. we divided the dataset into three parts with a split of 60% for training, 20% for validation, and 20% for testing, ensuring a uniform distribution of languages and users across these splits. the main objective of these experiments was to establish the optimal method while keeping the amount of manually labelled data to a minimum. this meant testing various few-shot and fine-tuning techniques for each of the three nlp tasks mentioned above @xcite . thus, with respect to sentiment analysis (1), we experimented with various techniques such as us-ing pre-trained models fine-tuned on our tweet corpus, and employing a few-shot method such as pattern-exploiting training (pet; @xcite . however, due to space constraints and the paper's focus, we cannot elaborate on a comprehensive evaluation. ultimately, we found that the fine-tuning the xlm-t model for sentiment @xcite was the most effective approach, achieving a high accuracy value of 0.939, compared to 0.877 for pet with the language model. we adopted a similar methodology for named entity recognition (ner) (2), which involved a single class (loc) that encompassed a broad array of 995 place names. here, the challenge was the low frequency of the label words in the annotated data. despite this, fine-tuning multilingual bert (mbert; @xcite demonstrated superior performance with an f1-micro @xcite score of 0.848, compared to 0.788 with the few-shot technique for sequence labelling implemented by entlm @xcite . lastly, for the task of thematic concept extraction (3), which included a highly diverse set of classes (315 instantiated touristic concepts from the thesaurus) with few label words, we found that prompt-based few-shot learning with entlm was significantly more effective, achieving an f1-micro score of 0.840, compared to 0.241 for the finetuning approach. for extensive details of the experiments briefly outlined in this section please check @xcite . in the next section, we will describe how to visualize these automatically generated annotations using textbi. ## the textbi dashboard the textbi dashboard (fig. 3 ) is a web-based tool that allows interactive visualization of nlp annotations for social media data. it is designed to be adaptable to any social media and domain, as long as the data adheres to the specified data model (see section 3). the dashboard offers a variety of features to facilitate the analysis of multilingual social media data across four dimensions: spatial, temporal, thematic, and personal. in our context, the domain is tourism, implying potential stakeholders could include tourism offices or destination marketing organizations @xcite . ## conclusion and future perspectives we have introduced a novel dashboard called textbi, designed to facilitate the visualization of automatic nlp annotations on social media data for both domain stakeholders and nlp researchers. it is powered by a generic data model, making it completely adaptable. textbi focuses on four dimensions: space, time, theme, and user, and offers various viewing options. additional enrichment data is also supported. textbi provides extensive interactivity, including combined filtering, visual synchronization, aggregation, and more. our future plans include enhancing textbi with features such as a user interface for granularity selection and enabling it to process live data by integrating with influxdb @xcite . after testing it on other domains and larger datasets to ensure its scalability, we intend to make textbi open-source.