Enhancing S wedish Parliamentary Data: Annotation, Accessibility, and Application in Digital Humanities (2024)

Abstract: The Swedish bicameral parliament data presents a valuable textual resource that is of interest for many researches and scholars. The parliamentary texts offer many avenues for research including the study of how various affairs were run by governments over time. The Parliament proceedings are available in textual format, but in their original form, they are noisy and unstructured and thus hard to explore and investigate. In this paper, we report the transformation of the raw bicameral parliament data (1867-1970) into a structured lexical resource annotated with various word and document level attributes. The annotated data is then made searchable through two modern corpus infrastructure components which provide a wide array of corpus exploration, visualization, and comparison options. To demonstrate the practical utility of this resource, we present a case study examining the transformation of the concept of ‘market’ over time from a tangible physical entity to an abstract idea.

## introduction in recent years, the digitization of historical and contemporary text has facilitated valuable research in text-based fields particularly in digital humanities. while newspapers and literature offer important avenues, parliamentary text are both complementary and important sources of knowledge. in this paper, we present the digitized swedish bicameral parliamentary data annotated with various token and text level attributes. the corpus is made accessible through the modern corpus infrastructure of språkbanken, the swedish language bank foot_0 . by applying a range of token and text-level annotations, we aim to enhance the accessibility and usability of the parliamentary records, making them a valuable resource for a broad range of research inquiries. the annotation process involves several layers, from basic tokenization to more advanced linguistic tagging. for this purpose, we rely on several in-house developed and external annotation tools. these annotations not only help in structuring the data but also enable researchers to extract meaningful patterns and insights that would otherwise remain obscured. furthermore, by integrating these annotated records into a modern and wellestablished corpus infrastructure, we ensure that the data is both easily accessible and scalable for various computational analyses. to illustrate the practical value of our enriched parliamentary data, we present a case study that explores the evolution of market-related language within legislative and political discourse. today, the market is a ubiquitous concept in both professional and private matters. however, this was not always the case historically, and 'the market' has gradually developed into the central concept it is today. while conceptual history studies have examined the market, particularly in later periods @xcite , a continuous description of the market as a concept across various contexts and discourses remains lacking. in response to this gap, a project called "the market language" foot_1 aims to provide an empirical based analysis of the market concept and its usage in sweden, utilizing available corpora @xcite . historically, the concept of "the market" has undergone transformation from an original meaning as a tangible, physical and time-specific space for trade, to more abstract notions like the "iron market," and eventually to a role of an active agent with the potential for influencing professional or private daily life, as in expressions such as "the market reacted badly to the latest inflation news." this linguistic and semantic shift reflects broader socioeconomic changes and raises numerous research questions of interest to both linguists and historians and also scholars in several other disciplines. for instance, when and how did this conceptual shift in market language occur? are there discernible linguistic patterns associated with different types of semantic change? can linguistic changes in how "market" is used be related to social and historical development or changes and also vice versa? the annotated parliamentary texts offer a rich and structured resource for investigating these questions. through this case study, we demonstrate the potential of our annotated corpus not only as a tool for linguistic analysis but also as a gateway to deeper historical inquiries, as done in @xcite as an example. by enabling researchers to trace the usage, frequency, and context of market-related terms across time, our corpus can provide insights into the factors driving these linguistic transformations. studying the change in meaning of the concept of "market" in the swedish language offers several advantages as an example of how parliamentary data has been incorporated into the corpus infrastructure. the word "market," or "marknad" in swedish, has a consistent lexical form over time, making it a good candidate for annotation. additionally, "market" is a concept that appears across various types of texts or discourses. this allows for comparisons between its use in political or legislative discourse and its use in other corpora within the infrastructure, such as media or literary texts. furthermore, existing research and studies have shown examples and parts of the development of the word "market," from the primarily concrete meaning that is still in use, to become increasingly abstract. the possibility to use a large set of discourse-specific data such as the parliamentary corpus, opens for showing a fuller picture of this development over time. ## the swedish parliament data the history of the swedish parliament or riksdag starts in the 15th century when the riksdag of the estates was formed with roots in parliamentary gatherings of swedish noblemen that span much longer. in the early modern era, this type of parliament was replaced with the bicameral parliament in 1867, which was in function until 1970 when the current one chamber parliament of the modern riksdag was installed. the bicameral riksdag existed at a time when sweden as a society was subject to many changes and went from being a poor, war-ridden and mostly rural country to becoming a modern and industrialized nation with a strong focus on democratic and emancipated values. the fundamentals of today's democratic form of government were essentially laid out, debated, and tried during the periods of the late 1800s and first half of the 1900s when the bicameral parliament was in function. this makes the texts of the bicameral riksdag important for researchers and scholars from several disciplines and there are other projects focusing on making other features than purely linguistic ones more available such as the the open parliament laboratory (opal) foot_2 at örebro university in sweden and also the swerik foot_3 project. similar efforts to make parliamentary data more available for especially research purposes can be found in the parlamint project that encompasses comparable corpora of parliamentary debates from 29 european countries and regions. this is a valuable resource for synchronic data, but the inclusion of the swedish bicameral parliament data also makes older, historical datasets available for research. the texts of the bicameral parliament of 1867 to 1970 were scanned by the royal library and are available in pdf format via the riksdag website foot_4 and the royal library of sweden foot_5 . the downloadable data files contain some metadata regarding type of text and year but are otherwise unstructured and difficult to use for large-scale searches or for linguistic analysis purposes. the files are also presented per year, which makes the total sum of text files that are accessible relatively high. this makes the data set problematic to handle as a bundle for both researchers, and particularly, an interested public. the interface where the original pdf files can be reached is not developed for quick access to the material in full. to overcome some of these obstacles, we have transformed the bicameral parliament data into a structured lexical resource by enriching it with a set of word and text level attributes. we have also made the data searchable though korp and strix, which are modern corpus infrastructure tools developed and maintained at språkbanken text 7 (the swedish language bank) at the university of gothenburg. these tools provide a range of options to easily access, explore, visualize, and compare the data that were not previously available. ## the corpus categories and statistics the swedish bicameral parliament data encompasses a variety of text types, including protocols, debates, and motions from individual members of parliament. the type categorization of the material is the original structure of the scanned text file and is used also for our integration of the parliamentary data into the corpus infrastructure, since the categories are based on the different text types of the parliamentary practices. the use of type categorization opens for more specialized searches and also for comparisons of different text types within the data set as well as with texts from both previous and contemporary parliamentary resources. ## the corpus infrastructure in recent years, there has been a remarkable surge in the production of digital textual data, i.e., corpora, and the conversion of non-digital texts into digital formats. this has simultaneously driven the need for the development of efficient methods for storing and exploring these extensive datasets. consequently, technology has evolved from basic string-matching search approaches to the creation of advanced corpus infrastructures that offer querybased search, comparison, and visualization capabilities. in the following sections, we will briefly introduce two such tools in the corpus infrastructure domain: korp and strix. these tools offer a wide array of options for exploring, comparing, and visualizing corpus and related statistics at word, sentence, and document levels. ## utilizing the corpus infrastructure this section provides a detailed account of the data annotation process and the subsequent steps taken to ensure its accessibility through korp and strix. as previously mentioned, språkbanken's corpus infrastructure utilizes a pipeline architecture, which is known as sparv. this pipeline encompasses a variety of both external and internal annotation tools designed for a wide range of word, structural, and text-level annotations. a comprehensive list of available annotations and the corresponding annotation tools are listed in the sparv user manual foot_10 . leveraging sparv, we have substantially enhanced our dataset with a diverse array of annotations. some of these attributes are self-explanatory, while others need a brief explanation. the 'universal features' attribute reveals essential linguistic details such as case, definiteness, gender, and number associated with the selected word. the 'dependency relation' attribute provides the dependency relationship of the selected word with the head in the sentence. the 'sentiment' indicates the emotional tone. more details can be found in the sparv user manual as mentioned above. text-level annotations encompass critical metadata, including the corpus category, file name, date, and some other text-level attributes. regarding corpus search functionality, korp of-fers three distinct types of searches: 'simple,' 'extended,' and 'advanced.' the 'simple' search is the most straightforward free-text search, allowing users to query the corpus for any given string. figure 1 illustrates the search hits in the keyword in context (kwic) view when searched for the term 'marknad' (eng market). the left-hand pane displays sentences retrieved from all documents within selected corpora containing the search term, while the right-hand pane presents both text-level and word-level attributes (for the selected string highlighted with a black background) as explained above. the search can be refined or broadened by utilizing the 'extended' search tab, which permits filtering based on various word and text-level attributes, and combining various attributes with logical and and or operators. for instance, one can filter the sentences where the term 'marknad' occurred as a noun only (or any other part-of-speech tag and other attributes). additionally, for more specialized requirements, the frontend offers an 'advanced' search option, enabling users to design search queries using the cqp query language @xcite . beyond these functionalities, the frontend comes with various other compelling features, including the ability to display context (a few sentences before or after the searched term), which can be invaluable during corpus exploration. in addition to presenting the search hits in the kwic view, the statistics on total number of occurrences for each matched word in the selected corpora overall and in each of the sub-corpora separately are also available under the 'statistics' tab (see figure 1 . another useful view is the 'wordpicture' view which shows other words associated with the searched word based on certain dependency relations such as subject, object, preposition, pre and post modifiers etc. figure 3 shows word picture of the word 'marknad' within the 'riksdag' corpora. such a view can come handy while analyzing a search word within a corpus by looking at associated words or by comparing it to another corpora (or sub-corpora). for example, in korp we also have another corpora of the recent swedish parliament proceedings @xcite . the word 'marknad' can be compared in these two collections through the word-picture view. figure 4 present this comparison, and as can be noted, the separate list of associated words in two collections can reveal certain comparative aspects of the corpora. for example, while the bicameral data speaks of the market as joint, nordic, domestic, european, foreign, open, large and free, the modern parliamentary data speaks of it with a different focus on free, joint, global, open, black, digital, international and lucrative. due to space constraints, we cannot delve into all of korp's features here, so we encourage readers to visit the https://spraakbanken.gu.se/ korp/ to explore the corpus and experiment with the many search options available. as can be seen in the given screenshots, in korp each search hit is restricted to 'a sentence' (or a few sentences if the context visualization is turned on). an alternative is to return the documents containing the searched terms as search hits (as opposed to sentences), and then provide an option to view the full document in reading mode. this is exactly, what the strix tool and interface is designed for. if we search for the term 'marknad' through the strix interface, a list of documents from the collection containing the search term will be displayed as shown in figure 5 . this list can be filtered further based on various text-level attributes (e.g. document type, document title, year etc.) using the given metadata filtering options in the left-hand side pane. clicking on any document will open the full document in text mode as shown in figure 6 . various text and word-level attributes of the selected text are displayed in the right-hand side, while the document itself is displayed on the left figure 5: screenshot of strix and side pane. also note that the selected document can be further searched using the 'search the current document' search box on top. again, due to the space limitations, it is not possible to explain all searching and exploring options provided by strix, and we refer the reader to språkbanken for further details. ## the market language the research project "the market language" has particularly benefited from the inclusion of material from the bicameral parliament in the swedish language bank collection of corpora. the project's need for corpus data spanning different time periods and sources has also played a role in the decision to process this material. making the complete records of the bicameral parliament from 1867-1970 available in the language bank's frontend has given the project's collaborators numerous new opportunities to conduct searches without needing specific computational linguistic expertise. a notable advantage is that the material can now be used and processed for searches based on linguistic form or language functions in text. while searchable text files were available previously, their format severely limited the ability to observe how specific lexical items, such as words or phrases denoting the market phenomenon, were expressed over time. this is particularly important because the material reflects political discourse at a time when both domestic and international economies were becoming increasingly interconnected, and the meaning of "market" was expanding. one focus of the project has been to examine how the original, concrete meaning of "market" as a place or location in time has increasingly been replaced or complemented by abstract meanings of "market." by being able to search the bicameral parliament material in the korp interface, all researchers in the project team, with different levels of computer linguistic training, have been able to confirm working hypotheses and develop new searches about how the market as an abstract concept has been expressed. for instance, a simple comparison of the occurrences of "market" in its indefinite form (marknad) with its definite form (marknaden) reveals a tendency for the definite form to be used more frequently over time. this suggests that "market" began to be referred to as an entity with increasing agency during this period, which is interesting when compared with its usage in modern corpus material, where the definite form is used to a higher degree. this indicative result can be followed up by finding cases where "market" is used in the subject role in a sentence as resulting from an intra-team discussion and collaboration based on the initial search results. figure 9 shows an increased use of market as a subject, both in the indefinite and definite forms with a sharper increase of the definite form marknaden. in this way, the parliamentary material from 1867-1970 serves as a basis for observing the evolution of currently established meanings. another clear example of the benefits for the project of including the bicameral parliament material in the corpus infrastructure is the ability to map and analyze compounds containing "market." forming multi-element compound words is a typical feature of word formation in swedish and other germanic languages with english as a notable exception. through annotation work and the various functions of the korp interface, it is easy to list all compounds with "marknad" as an element, both when it serves as a prefix and as a suffix. the project team has conducted many such mappings, and these searches reveal a great variation in the meaning and discursive semantics of these compounds. this type of search can now easily be conducted by all team members in the korp interface, which facilitates initial interpretation and discussion of results. one more specific result is that new compounds with "market" appear to have been continuously formed over the period covered by the material, often in relation to the political changes discussed in parliament at different times. compounds with concrete connotations (like "cattle market" or "butter market") are common in the mid 1800s but are gradually replaced by increasingly abstract constructions that indicate the swedish economy's connection to other economies (such as "world market" or reference to a "domestic market" in contrast to "foreign markets). furthermore, the concept of "market" also extends into other political areas (such as "labor market" or "housing market") during the 1900s. figure 9 shows the increase of the compound word "arbetsmarknad" (labor market) in relative frequency in the parliamentary texts over time. the compound is most frequent towards the end of the bicameral parliament in sweden in the 1950s and 1960s. 7 conclusions we have annotated the swedish bicameral parliament data with text-level as well as token-level attributes to make searching, filtering, and exploration much easier and more useful for broader groups of potential users with different level of technological knowledge. the market language project has incentivized the inclusion of the dataset into the infrastructure. the research team is now able to work on the project's original research questions and can also address new questions that arise from the results with the help of the infrastructure interface. this makes it easier for team members without computational linguistics training and also improves the quality of the output data. further, the inclusion of bicameral parliament data in the språkbanken environment helps complete the picture of making public texts in swedish available, both for the research community and for other public purposes. we believe and hope that this collection of texts will be a valuable resource for deeper analysis of the swedish political discourse during the period when the bicameral parliament was in function. together with existing corpora of other parliamentary data and government texts, the bicameral parliament corpus will also enable more informed crosscorpora searches. this benefits scholars in historical studies as well as researchers from many other disciplines, not least in studies of language. the data of the bicameral parliament has existed in other formats for a long time, but the inclusion of this material into språkbanken makes it accessible and also adds a valuable new component to this infrastructure.