Making of MigParl (post-beta)

MigParl is a corpus of plenary debates about migration and integration in the German federal states. It was first presented during a workshop of the PolMine project in November 2018 as a beta version with limited access to the participants of the event. Since then, the corpus has seen major improvements. The following document serves as a technical documentation of this development. It is divided into four subsections: 1) Dictionary-Based topic selection, 2) The encoding of topic probabilities, 3) the creation of subcorpora from the initial corpora containing all speeches and 4) the merge and reencoding of these subcorpora to create MigParl.

1. Creating a meaningful subset of speeches

MigParl is a thematic subcorpus of all debates in the German regional state parliaments. Therefore, a procedure to classify speeches as relevant for this subcorpus is needed. One central approach to this endeavour is the deployment of a topic modelling approach.

Topic Modelling

Topic Modelling is an unsupervised machine learning approach which is often used for cases like this: We want to classify documents of an collection, separating them into identifiable classes using the textual features of the documents and their manifestiations in the collection. This data-driven approach is particularly useful in cases in which we are not sure which topics to expect in a corpus (Silge and Robinson, n.d., chap. 6). The technical implementation of the topic modelling procedure is explained elsewhere. Importantly, we use the Latent Dirichlet allocation (LDA) as the approach to fit the topic models. With LDA we can estimate the topic probability for each document (Silge and Robinson, n.d., chap. 6).

Topic Selection

In the beta version of the MigParl corpus (build date 2018-11-27) we calculated a topic model for each regional parliament corpus and identified the relevant topics qualitatively by checking the 50 most relevant terms per topic by hand.

In this update, we still perform a topic model for each regional parliament. However, instead of evaluating 4000 topics manually, we used a predefined list of key terms to determine their relevance for the selection. The initial list was created by Blätte and Wüst (2017) comprising about 800 terms which were collected in a semi-supervised fashion, starting from a number of seed words and expanding on them by exploring composita which actually occur in the data.

Dictionary

Using a list, we are confronted with a trade-off between precision (using a sparse amount of keywords to grasp a well-defined group of speeches) and a broad selection, consisting of more documents than we would want in a narrow definition. Diverging from the initial list by Blätte and Wüst (2017), we decided to use a broader definition, accepting false positives as we wanted to retain the possibility to filter the classification results afterwards. After labelling two topic models manually to establish a standard understanding of the relevance of a topic, we extended the list in an iterative process until the dictionary approach matched the human classification without introducing too many non-topical positives. To this end, we included a number of terms which are not necessarily referring exclusively to migration and integration and which were in part omitted from the initial list because of their ambiguity: “Leitkultur”, “Identität” and “Integration” describing cultural aspects, “Terror-,”Anschlag“,”Anschläge“,”Gefährder" and “Sicherheit-” as indicators of security discourse and “Ausland”, “ausländ-” and “Europa” to cover references to international contexts. Again, these terms can be characterised by a high degree of ambiguity and should not suggest a certain understanding of integration and migration. On the contrary, the inclusion these terms enables us to uncover the connection between migration and integration discourse on the one hand and adjacent topoi. This is something that would not be possible with a narrower dictionary.

Some words of the list were shortened by a hyphen, such as “Schmuggler-” (facilitators of (illegal) migration) which for example might also include “Schmugglerbande”. This possibility was implemented as well.

The resulting list is as dictionary:

Semi-Automatic Labelling

We test the approach with the initial list proposed by Blätte and Wüst (2017) extended by the words described above. As the central evaluation step, we want to compare the 100 most relevant words of each topic we modelled with this list. We will label the topic as relevant if at least five words of the list also occur in the 100 most relevant words of the topic.

Performed with the initial keyword list, we found 93 relevant topics. After checking for a last time if these topics seem reasonable we are content that this method improves reproducibility and transparency.

2. Annotating speeches with topic probabilities

The following chunks of code will separate an individual corpus into speeches and add the sum of the probability of those topics we identified as relevant as an structural attribute to each speech. We then can create a subcorpus of those speeches with a sum probability greater than a certain threshold.

Procedure

First, the s_attribute speech must be encoded into the existing corpus. In a second step, for each speech, the sum of the probabilities of those topics which are relevant for migration and integration research are encoded.

Load initial corpora

Encode speeches per corpus

Encode Migration and Integration Probability

Afterwards, we sum up the probability we calculated with the topic model, determining that a speech is indeed about migration and integration in some sense. To determine the relevant topics we used a dictionary approach described earlier.

Example from the Saarland

After resetting the registry, each speech in every corpus does have a migration and integration probability attached to it.

We will use this annotation in the following step to create subsets of relevant speeches from each corpus to create MigParl.

3. Creating subcorpora based on the sum of migration and integration probability

Now we want to use this probability to create a subset of each regional corpus and merge them to create MigParl. The question is which estimated proportion of words of a speech does have to belong to a topic relevant to migration and integration in order to be part of the MigParl corpus (Silge and Robinson, n.d.)?

Which probability?

In the logic of LDA topic models, each document - here: speech - does belong to each topic in varying order.

In consequence, even speeches which have very little relevance to migration and integration related issues could have a probability greater that zero to be part of the topic. One essential question is how we create an optimal trade-off between false positives (speeches which do have a numeric probability greater than the threshold we set but are not relevant) and false negatives (the other way around). In terms of machine learning, this can also be described as the trade-off between precision (to which extent does every document in a thematic subcorpus actually belong there) and recall (how many documents of the base population which do belong to the subcorpus are actually part of it). When choosing the topics we are using an approach which values reproducibility and inclusiveness over accuracy. Hence, the dictionary approach uses a deliberatively broad word list with a great deal of ambiguity. A lot of words will be used in other contexts as well but we are more concerned to miss out on a topic than to include too many topics (in other words: when in doubt, we prefer recall over precision). Choosing a proper threshold is a way to balance both demands.

Trials

Since it is hard to tell a priori which would be a fitting threshold, we test it with the smallest parliament we have: The Saarland corpus.

Mean, max and min probabilities

Over all the mean probability of a speech to belong to migration and integration relevant topics is 0.008914 with a maximum value of 0.5154976 and a minimum value of 0. Given the very small mean value, it might be unreasonable to assume a very high threshold which would capture only a very small subset of speeches.

Proportions

In the following, we used several threshold values and calculated the proportion of the resulting subset to see if that is the case.

## A threshold of 0.02 returns 9.65 per cent of the corpus 
## A threshold of 0.05 returns 5.11 per cent of the corpus 
## A threshold of 0.1 returns 3.67 per cent of the corpus 
## A threshold of 0.2 returns 1.93 per cent of the corpus 
## A threshold of 0.3 returns 0.55 per cent of the corpus 
## A threshold of 0.4 returns 0.05 per cent of the corpus

The proportion of the subset size and the corpus size varies from 9.65% with a threshold of 0.02 to 0.05% with a threshold of 0.4. Intuitively certainly more than one percent of the speeches held in a German parliament would be related to some form of migration and integration relevant topic. Hence, we qualitatively check whether the smaller thresholds (0.02, 0.05, 0.1 and 0.2) yield reasonable results in terms of relevant speeches returned.

Checking qualitatively

We can read a couple of speeches which were returned by different thresholds. To make the judgement easier, we highlight the words which were matched against the dictionary to determine relevance. Here, we print one sample speech:

Corpus: SL

Karl-Josef Jochem | 2004-12-15 | FDP | 2004

Herr Präsident! Sehr verehrte Damen und Herren! Kolleginnen und Kollegen! Nach den Diskussionen der vergangenen Wochen könnte man meinen, Integration sei ein völlig neues Thema. Wenn es auch nicht jedem bewusst ist, aber die Frage der Integration von Ausländern beschäftigt die Bundesrepublik Deutschland schon seit ihrer Gründung. Ohne die Zuwanderung von Gastarbeitern nach dem Kriege wäre der Wiederaufbau des zerstörten Deutschlands nicht möglich gewesen. Umso bemerkenswerter ist es, dass wir in Deutschland mit der Integrationsdebatte noch am Anfang stehen. Überlegungen betreffen dabei auch das Saarland, das mit einem Ausländeranteil von 8,5 Prozent nur knapp unter dem Bundesdurchschnitt von 8,9 Prozent liegt.

Die bisherige Diskussion wurde immer wieder durch die Verwendung zweier fragwürdiger, zumindest aber missverständlicher Begriffe geprägt. Die CDU hat den Begriff der Leitkultur erfunden. Wir von der FDP meinen, dieser Begriff ist wirklich missverständlich, denn man könnte ihn so auslegen wie in der Wilhelminischen Zeit:

Am deutschen Wesen soll die Welt genesen. - Oder was ist sonst damit gemeint?

( Zuruf des Abgeordneten Hans ( CDU ). )

Herr Kollege Hans, der Begriff ist missverständlich. - Der Mainzer Parteienforscher Professor Falter weist in diesem Zusammenhang in einem Interview zu Recht darauf hin, dass man den Begriff Leitkultur nicht verwenden sollte, weil man den Menschen in einer liberalen Gesellschaft nicht vorschreiben kann, was sie zu tun haben.

( Erneuter Zuruf des Abgeordneten Hans ( CDU ). )

Ich komme darauf zurück. - Genau so sieht es die FDP-Fraktion. Außerdem, Herr Kollege Hans, hat sich auch unser Ministerpräsident Peter Müller von dem Begriff distanziert. Die Gegenposition zur Leitkultur wird immer wieder mit dem Begriff multikulti, also der multikulturellen Gesellschaft, umschrieben. Diese Position nimmt aber jede andere Kultur in all ihren Erscheinungsformen kritiklos hin. Eine solche Laissez-faire-Mentalität trennt aber mehr als sie eint. Sie hat nicht zur Integration geführt, sondern zur Entwicklung von Parallelgesellschaften, die beziehungslos nebeneinander existieren. Sie neigt außerdem dazu, die Augen zu verschließen vor Missständen wie der Unterdrückung von Frauen und der Gettobildung, die sich als Folge der Abschottung ausländischer Mitbürger gegen unsere Gesellschaft ergeben.

Wir sind deshalb der Meinung, dass man keine untauglichen Begriffe wie Leitkultur oder multikulti finden muss, um eine gemeinsame Basis für ein Zusammenleben von deutschen und Ausländern zu ermöglichen. Eine tragfähige Grundlage für die Integration findet sich vielmehr in den Werten, die im Grundgesetz ihren klar formulierten Niederschlag gefunden haben. Demokratie, Rechtsstaatlichkeit, die Trennung von Religion und Staat und ganz eindeutig die Grundrechte sind eine bewährte Grundlage unseres Gemeinwesens und bieten die Perspektive für eine erfolgreiche Integration. Bei der praktischen Umsetzung der Integration ist uns als FDP das Thema Bildung ein zentrales Anliegen. Im Mittelpunkt steht die Beherrschung der deutschen Sprache, ohne die die Entwicklung abgeschotteter Parallelgesellschaften unausweichlich wäre.

( Beifall von der FDP. )

Da sich die Sprache im Kindesalter am leichtesten erlernen lässt, muss die Sprachförderung auch hier ansetzen. Deshalb ist unserer Ansicht nach das Modellprojekt Früh Deutsch lernen '' an saarländischen Grundschulen baldmöglichst flächendeckend auszuweiten. Verbindliche Sprachstandserhebungen im Alter von vier bis fünf Jahren ermöglichen eine sichere Diagnose, ob gezielte sprachliche Förderung erforderlich ist. Bei Erwachsenen ist das Erlernen einer neuen Sprache schwieriger. Dies darf aber nicht dazu führen, dass sie sprachlich ausgegrenzt werden. Vielmehr ist besonders die kombinierte Sprachförderung von Müttern, Vätern und Kindern, die sich als erfolgreich erwiesen hat, ins Auge zu fassen. Für bedenklich halten wir als FDP, dass nach einem Schreiben des saarländischen Innenministeriums vom 23. November Einsparungen im Bereich der Integrationsförderung geplant sind. Dort, wo sich nicht staatliche Vereinigungen personell und finanziell engagieren, sollte der Staat froh sein über dieses Engagement Dritter, und er sollte diese Tätigkeiten auch unterstützen. Denn wenn der Staat irgendwann selbst zu der Erkenntnis gelangt, dass diese Integrationsarbeit unentbehrlich ist, dann muss er die Arbeiten vollständig selbst organisieren und finanzieren. Das wird am Ende für den Steuerzahler teurer sein als die Förderung von Integrationsmaßnahmen, die Dritte durchführen. - Wir fragen ja auch, was die Gesellschaft für den Staat tun kann. Denn man kann nicht immer nur nach dem Staat rufen. Insofern ist das eine gute Möglichkeit. Da die Integration auch die Frage der Religion betrifft, muss ein intensiver Dialog mit den Religionsgemeinschaften gesucht werden. Gerade die beiden großen Kirchen sind dazu aufgerufen, sich mit den islamischen Organisationen auszutauschen, die eine Vielzahl von Ausländern repräsentieren. Der tatsächliche Dialog verspricht jedenfalls mehr gegenseitiges Verständnis zu wecken, als der von Christian Ströbele kürzlich angeregte Umtausch eines christlichen Feiertages in einen islamischen. Dies lehnen wir kategorisch ab.

( Beifall von der FDP. )

Unser Grundgesetz gebietet, dass die Freiheit des Einzelnen dort endet, wo die des Anderen beginnt. Nach unserer Auffassung kann jeder nach seiner Fasson selig werden - aber im Rahmen der hier geltenden Gesetze. Lassen Sie mich zwei Beispiele anführen, die wir als hinderlich für eine Integration ansehen: Ich komme auf das Thema der Unterdrückung von Frauen zu sprechen. Es kann nicht sein, dass in Deutschland junge Frauen gegen ihren Willen verheiratet werden sollen. Zum Schutz vor Zwangsverheiratung unterstützen wir deshalb die baden-württembergische Bundesratsinitiative, die in umfassender Weise Handlungen in Zusammenhang mit der Zwangsverheiratung unter Strafe stellt.

( Beifall bei FDP, CDU und SPD. )

Auch kann es unsere Gesellschaft nicht hinnehmen, dass jungen Mädchen die Teilnahme am Sportunterricht oder an Schulausflügen von den Eltern untersagt wird. Denn Erziehung bedeutet nicht nur ein Recht, sondern auch eine Pflicht gegenüber den Kindern. Diese Pflicht wird verletzt, wenn Eltern ihre Kinder von allen schulischen Veranstaltungen fern halten und somit Integration unmöglich machen.

Jedem muss klar sein, dass Integration nicht nur fördern sondern auch fordern bedeutet. Wir erwarten, dass Ausländer die im Grundgesetz niedergelegten Werte nicht nur anerkennen, sondern auch dementsprechend handeln. Wir haben den ausländischen Mitbürgern viel gegeben. Aber wir haben in der Vergangenheit zu wenig gefordert. Als Beispiel will ich das Thema Sozialleistungen nennen. Wir werden auch in Zukunft denen etwas geben, die der Hilfe bedürfen. Wir werden uns auch zukünftig nicht verweigern, auch den ausländischen Mitbürgern das zu geben, was für die Integration notwendig und wichtig ist. Aber wir müssen auch auf tatsächlicher Bereitschaft zur Integration bestehen. Wir sagen klar und deutlich: Integration ist keine Einbahnstraße, sie bedarf des Willens und der Erkenntnis beider Seiten.

( Beifall bei FDP und CDU. )

Jeder, der in diesem Land leben will, muss sich klar zu unserem Grundgesetz bekennen. Das Grundgesetz hat sich als Werteorientierung bewährt. Eine feierliche Zeremonie anlässlich der Einbürgerung halten wir deshalb überlegenswert. Derjenige, der zu uns kommen will, muss aber diese Werteorientierung akzeptieren und sie in unserer Gesellschaft leben. Jeder, der dies nicht akzeptieren will, der diesen Wertekanon nicht annehmen will - das sagen wir klar und deutlich -, hat in unserer Gesellschaft keinen Platz. Dies wäre nämlich eine falsch verstandene Toleranz. Es ist die Aufgabe der Politik, wieder für mehr Toleranz in der Gesellschaft zu werben. Eine tolerante Gesellschaft ist eine offene Gesellschaft. Lassen Sie uns gemeinsam für diese offene Gesellschaft streiten. - Ich bedanke mich für Ihre Aufmerksamkeit.

( Beifall von der FDP. )

Conclusion - Probability Threshold of 0.05

The smallest threshold of 0.02 which is twice the mean of the probabilities, is certainly not restrictive enough. Checking manually, we do have a lot of false positives. As for the highest threshold of 0.2 (which is the case for the speech shown above), we have only relevant speeches but at the same time we cover only a small portion of the initial corpus. Hence, we do expect a lot of false negatives as well. A threshold of 0.05 seems to be the best trade-off from this point of view. There is no guarantee that this is the case for all parliaments we subset but it is our best guess going forward.

Create subcorpora for all 16 regional parliaments

We subset each regional corpus by the migration and integration probability. In addition, to account for the varying coverage of the regional state corpora, we limit the time range to 2000 to 2018. This safeguards comparability within the corpus as almost all of the regional states are part of the entire time span (apart from Saarland which only starts in 2005 and Rhineland-Palatinate which starts in 2001). In addition, this aligns MigParl with other resources of the MigTex project.

Now we have individual token streams and metadata for each regional state. Unfortunately, memory gets scarce pretty fast, which is why we do not try to keep the token streams in the RAM.

4. Creating MigParl from relevant subcorpora

In the previous steps, we determined which topics of our topic model are relevant, we calculated the probability that single speeches belong to these topics, we determined a fitting threshold probability to be considered in the subcorpus and finally created subcorpora based on these considerations. Now these subcorpora have to be merged and encoded into the MigParl corpus. The steps necessary here largely follow the vignette of the cwbtools package.

The output will be the MigParl corpus itself as a tarball which can be installed by cwbtools and used by polmineR.

## [1] TRUE
## logical(0)

SessionInfo

## R version 3.5.3 (2019-03-11)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.6
## 
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] data.table_1.12.6    cwbtools_0.0.12.9007 polmineR_0.7.11.9049
## [4] magrittr_1.5        
## 
## loaded via a namespace (and not attached):
##  [1] NLP_0.2-0         Rcpp_1.0.2        RcppCWB_0.2.8    
##  [4] compiler_3.5.3    later_1.0.0       tools_3.5.3      
##  [7] digest_0.6.21     jsonlite_1.6      evaluate_0.14    
## [10] lattice_0.20-38   rlang_0.4.0       Matrix_1.2-15    
## [13] shiny_1.4.0       crosstalk_1.0.0   curl_4.1         
## [16] yaml_2.2.0        parallel_3.5.3    xfun_0.10        
## [19] fastmap_1.0.1     stringr_1.4.0     knitr_1.25       
## [22] xml2_1.2.2        topicmodels_0.2-8 htmlwidgets_1.5.1
## [25] stats4_3.5.3      DT_0.9            grid_3.5.3       
## [28] R6_2.4.0          pbapply_1.4-2     rmarkdown_1.11   
## [31] promises_1.1.0    htmltools_0.4.0   modeltools_0.2-22
## [34] mime_0.7          xtable_1.8-4      httpuv_1.5.2     
## [37] stringi_1.4.3     slam_0.1-45       tm_0.7-6         
## [40] markdown_1.1

References

Blätte, Andreas, and Andreas M. Wüst. 2017. “Der Migrationsspezifische Einfluss Auf Parlamentarisches Handeln: Ein Hypothesentest Auf Der Grundlage von Redebeiträgen Der Abgeordneten Des Deutschen Bundestags 1996–2013.” PVS Politische Vierteljahresschrift 58 (2): 205–33. https://doi.org/10.5771/0032-3470-2017-2-205.

Silge, Julia, and David Robinson. n.d. “Text Mining with R: A Tidy Approach.” https://www.tidytextmining.com.