Abstract
The Sustainability & Health Corpus is a partnership between the Centre for Sustainable Healthcare Education (SHE), Faculty of Medicine, University of Oslo (where it is housed) and the Genealogies of Knowledge Research Network. The corpus allows researchers and students to investigate how particular words, concepts, and themes are used across different collections of texts. The existing SHE Corpus workflow included both a web interface and a downloadable ModNLP desktop application. While the web interface made basic corpus search and exploration available through the browser, some functionality was still only available in the desktop application. One important missing feature was the Compare Frequencies (Comfre), visualization module. This tool allows users to compare word frequencies across two subcorpora and supports an iterative form of textual analysis where users can examine differences between collections, identify representative terms, and refine their interpretation of the corpus. The goal of this project was to investigate the technical feasibility of bringing this desktop-only functionality into the web interface and to implement a working prototype.
Background
The SHE Corpus is designed to support research and teaching in the fields of healthcare, medical humanities, and sustainability studies. It is a large electronic corpus of health and health-related texts, accompanied by an open access software interface and visualization tools. The corpus supports users who want to study how language is used across different bodies of texts and how concepts develop across domains, institutions, or time periods.
The project builds on the ModNLP software ecosystem. ModNLP is a modular suite of natural language processing tools written mainly in Java. In the original workflow, users could access the SHE Corpus either through a web interface or through a desktop version of the ModNLP application. The web interface was easier to access because it runs directly in the browser, while the desktop version required users to download and run a Java-based application. In practice, this created an accessibility challenge. Some users may find it inconvenient to run a desktop Java tool, and institutional security restrictions can make downloaded executables difficult to use. Moving more functionality into the web interface therefore improves usability, especially for students and researchers who need lightweight access to corpus analysis tools.
During the initial project discussion, both the existing web interface and the desktop ModNLP tool were demonstrated. The main requested feature was the frequency-comparison module available from the “Plugins” menu in the desktop application. This module, known as Comfre, supports comparison of word frequencies across two corpora or subcorpora. The original Comfre design is described as a visualization for comparing word frequencies across two corpora. This type of visualization is useful for active and iterative text analysis. For example, a researcher may create two subcorpora from the SHE Corpus and compare which terms are more prominent in one collection than the other. The project therefore addressed both a technical and a usability problem: how to bring a useful desktop-only corpus analysis visualization into a browser-based environment without disrupting the existing SHE Corpus web application. The updated web portal hosted under NREC is shown in Figure 1.

Methodology
The implementation started with a technical review of the existing SHE Corpus tools, including the public web interface, the user manual, the ModNLP desktop application, and the available public repository for the web client. The main requirement was to port the Comfre frequency-comparison workflow from the desktop application inside the web version of the tool. Since the existing web interface could not be directly modified, the development work was carried out on a cloned version of the public SHE Corpus web client. This allowed the new functionality to be added and tested independently. The workflow includes users first creating/selecting two subcorpora of interest, and then using the Comfre module to compare word frequencies between them. This preserves the analytical workflow already familiar to the users. The integrated Comfre visualization inside the SHE Corpus web application is shown in Figure 2.
During development with simple development servers, the application could not load the dataset properly. This happened because the local web app tried to fetch data from the remote SHE Corpus server, but the browser blocked the requests due to CORS restrictions. To solve this, a lightweight Node.js proxy server was added. The proxy runs locally, and forwards requests from the local web app to the remote server, and returns the responses with the required CORS headers. This made it possible to test the cloned web client locally while still using the original data server.

The project mainly focused on functional porting rather than performance optimization. The original Java desktop implementation was reported to have performance limitations, and similar issues may need to be addressed in the web version. Future work should therefore include testing with larger subcorpora, profiling the visualization pipeline, improving responsiveness of the existing visualizations.
All scripts and documentation related to this project are available at the github repo https://github.com/sherinsugathan/she-corpus-uio. The extended web application is currently hosted on NREC servers at https://she-corpus.uiocloud.no/.