Towards Efficient and Interoperable Search in Text Corpora

Niklas Deworetzki

Licentiate Thesis. University of Gothenburg, Gothenburg, Sweden

https://gupea.ub.gu.se/items/7f036014-8a0d-4ef6-8fd1-3c77c411cd93

3 November 2026

Abstract

Linguistically annotated text corpora are a fundamental resource for linguistic research and natural language processing. As corpora grow in size and annotations become increasingly complex, corpus search systems must support expressive queries while remaining efficient, interoperable, and accessible.

This thesis investigates techniques for addressing these challenges while reusing existing software and infrastructure through three complementary approaches. The first approach investigates the use of general-purpose graph databases for efficient execution of syntactic queries over syntactically annotated corpora, focusing on the Universal Dependencies framework of annotation. The second approach introduces CQP/Tree, which translates tree- and graph-based dependency queries into the widespread sequence-based query language CQL, allowing existing corpus systems to support more expressive syntactic queries. The third approach investigates whether large language models can lower the barrier to formulating queries by translating natural-language descriptions of linguistic phenomena into queries for the Grew corpus system, which provides a graph-based query language for syntactically annotated corpora. This approach also includes methods for generating training data for low-resource domain-specific languages other than Grew.

The results illustrate how techniques from databases, programming languages, and natural language processing contribute to improve query execution, interoperability between existing infrastructures, and accessibility of expressive query languages.