Digital resources in the Social Sciences and Humanities OpenEdition Our platforms OpenEdition Books OpenEdition Journals Hypotheses Calenda Libraries OpenEdition Freemium Follow us

Styloscope and Toposcope: Towards User-Friendly Digital Text Analysis

Natural Language Processing (NLP) has been one of the fastest-growing research fields in the last decade. Innovations such as pre-trained large language models based on transformer neural networks have not only led to the popularization of AI and NLP in the general public, but also to interdisciplinary research projects in the humanities and social sciences facilitated by the scalability of these methods. In this post, we present two tools that aim to facilitate said interdisciplinary research: Styloscope and Toposcope.  The tools were developed in Python and can be used from the command line or from a user interface. The code, detailed installation instructions, and user guidelines can be found on GitHub:

Styloscope

Styloscope is a tool for automatic writing style analysis. It can be used to test hypotheses about large-scale corpora, parse documents, or detect outliers. Users can provide data by either uploading a local file or by using a publicly available Huggingface dataset. When uploading a corpus, the tool accepts CSV files with one document per row, and ZIP folders in which documents are stored in individual text files. The output contains the parsed documents, raw statistics on various writing style features such as syntactic dependencies, lexical richness,  readability, etc., and visualizations of aggregated results. An example for syntactic dependencies is provided below:

Toposcope

Toposcope can be used to detect topics in unstructured text data. It provides annotations and visualizations of the detected topics, including (changes in) topic frequency over time. The tool features four algorithms: BERTopic (Grootendorst, 2022), Top2Vec (Angelov, 2020), Non-negative Matrix Factorization (Choo et al., 2013), and Latent Dirichlet Allocation (Blei et al., 2003). Users can modify a selection of topic model parameters, and apply a number of built-in preprocessing steps, such as lemmatization and stopword removal. The input format is identical to the Styloscope format: users can upload a local corpus (CSV/ZIP), or use a Huggingface dataset. The output includes visualizations of the topic-document clusters (as shown below) and the most important keywords per topic. The raw results, among other things, consist of annotations, a topic-document matrix, and a topic-term matrix. Topic diversity and topic coherence are also computed in order to support the user during the evaluation of the tool.

How to cite

Jens Lemmens and Walter Daelemans. 2024. Styloscope and Toposcope: Towards user-friendly digital text analysis. CLiPS Technical Report Series (CTRS): 10. https://www.uantwerpen.be/en/research-groups/clips/research/computational-linguistics/compling-resources/clips-technical-repo/

References

  • Dimo Angelov. 2020. Top2Vec: Distributed representation of topics. arXiv:2008.09470.
  • David M. Blei, Andrew Y. Ng, and Michael I. Jordan. 2003. Latent dirichlet allocation. Journal of Machine Learning Research, vol. 3, pp. 993—1022.
  • Jaegul Choo, Changhyun Lee, Chandan K. Reddy and Haesun Park. 2013. Utopian: User-driven topic modeling based on interactive nonnegative matrix factorization. IEEE Transactions on Visualization and Computer Graphics, vol. 19 (12), pp. 1992—2001. Institute of Electrical and Electronics Engineers (IEEE).
  • Maarten Grootendorst. 2022. BERTopic: Neural topic modeling with a class-based TF-IDF procedure. arXiv:2203.05794.

CLARIAH-VL SIC 5 tool descriptions

A CLARIAH-VL supported data management system: nodegoat

Information on people, places, and things are related to each other in different ways. There are countless ways we can infer these relations which are research question and source dependent. There are also many ways to store this information as data. The nodegoat platform is an object oriented relational web-based data management system which also provides network and geospatial visualizations in one platform. It has the availability to develop custom data models, and then collaborate on this data and later generate visualizations and export data. Within CLARIAH-VL nodegoat is used to store, organize, maintain and analyze relational data. Below you can find the cases where the platform is currently or has been used.

To support researchers in their use of such data, CLARIAH-VL & GhentCDH are hosting 2 nodegoat workshops. In the workshop you will learn how to use this platform for your research. The workshops will be held in two parts on the same day:

1) beginners

2) advanced users (users that already are using nodegoat or have setup an instance).

The workshops, given by the developers of the platform – Lab1100, will be held on 16 November from 10 – 12h & 14 – 16h respectively at Ghent University. Both workshops will be given in English, but questions may be asked in Dutch. The exact location will be confirmed two weeks before the location to registered participants. Please register here: https://event.ugent.be/registration/nodegoat.

An example of the nodegoat instance, as used in the TIC Collaborative project. This network represents a social visualisation of people and conferences.

To get an idea of how nodegoat can be used in research, see this list of the use cases, all projects supported by GhentCDH (CLARIAH-VL):