urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:	edition	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1	body	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.1	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.1.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-5e3754e0-f5cb-94e5-6b7e-e4f84c333592" />detecting direct speech in fiction allows gaining insight into an important element of its narrative structure. in literary studies, there are assumptions on the factors influencing the distribution of direct speech, like genre, period and aesthetic complexity.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.1.2	p	this paper aims to provide a detailed analysis of the use of direct speech across different time periods and domains. to create a reliable database for these analyses, we need to measure the usage of direct speech in a large and representative corpus. this task is more challenging than it may sound: while, nowadays, direct speech is often marked very explicitly by the use of quotes, this has not always been consistently the case. many historical novels are not available in a well-edited form, meaning that there may be inconsistent use of quotation, or no quotation at all (brunner, 2013). in this case, a more robust method for detecting direct speech is necessary.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.1.3	p	our first contribution is therefore a deep learning-based method to detect direct speech using large amounts of rule-based, but slightly flawed, labelled data extracted from raw text. this has multiple advantages over the use of manually annotated training data: first, manually annotating large amounts of text is very time-intensive and therefore costly. furthermore, annotations for one type of texts may not be transferable to other types, leading to the necessity of new annotated data for new corpora. being able to learn from the already existing weakly labelled data is therefore desirable, as this data can automatically be extracted for a new corpus.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.1.4	p	our second contribution is the application of this approach on curated texts to gain insight in trends of direct speech distribution. on one hand we try to look for development of direct speech over time, analysing a large dataset of novels from the nineteenth century, on the other hand we focus on differences in genre comparing contemporary high and low brow literature.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-d44f6f66-f5cc-1464-f0a8-9c54aaf8310d" />there have been several previous approaches to direct speech detection applying machine learning methods.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.2	p	for example, brunner (2013) tests rule-based and machine learning driven classification, as well as combinations of both, on german novels. she recommends using a pure machine learning approach (random forest), reaching an f1 score of 0.87.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.3	p	scheible et al. (2016) employ a simple greedy algorithm and a semi-markov model, showing that the latter outperforms the previous state-of-the-art by achieving a precision of 0.88.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.4	p	although the results seem quite satisfying, these systems require a relatively large amount of labelled data for training. as stated above, this is problematic because of the need for expensive annotation and lack of transferability to other domains. thus, our goal in this paper differs from that in previous work. we do not aim to set a new state-of-the-art in direct speech detection, but instead:
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.5	p	a) present a method that can leverage large amounts of weakly labelled data extracted from raw text, and
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.6	p	b) use this model for the analysis of different distributions of direct speech across genres or time-periods.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.2.7	p	to the best of our knowledge, the second task has never been done on a large collection of texts.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5cc-960c-9591-0e3103362c5b" />the following experiments are based on three german corpora. the first one is a large corpus containing 4600+ public domain novels including texts from the textgrid digital library<ref xmlns="http://www.tei-c.org/ns/1.0" target="ftn1" n="1" />and project gutenberg<ref xmlns="http://www.tei-c.org/ns/1.0" target="ftn2" n="2" />. we will refer to this as the corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">public domain</hi>, pd. the second one contains 800+ texts of current popular genres like romance, crime or science-fiction (corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">low brow</hi>, lb). finally, we use a corpus with 200 novels nominated for the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">german book prize</hi> or the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">georg büchner prize</hi> (corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">high brow</hi>, hb).
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3.2	p	in order to train and evaluate our classifiers, we need to obtain labels specifying which parts of the texts contain direct speeches. to this end, we chose two strategies:
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3.3	p	for training our classifiers, we decided to extract weak labels using a simple rule based on quotation, implying everything written between quotation marks is direct speech. to yield high accuracy for this approach, it is necessary to use a well-edited collection of texts. our pd corpus contains such a subset, which we refer to as our <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi>. this <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi> consists of 250 high and middle brow texts (those from the textgrid digital library), has been manually edited and is assumed to have a mostly consistent use of quotation.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3.4	p	using our quotation rule on the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi> resulted in a dataset where about 36% of tokens were marked as direct speech. in order to assess the quality of these weak labels, we gave 500 of the sentences to domain experts for manual correction. we found that there was an error-rate of about 3% in those sentences, mostly caused by nested direct speech or inscriptions being enclosed by quotation marks.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.3.5	p	for further evaluation, we chose to annotate a smaller subset of the corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">lb </hi>by hand. we selected 50 snippets from texts of low brow literature. this dataset, referred to as <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">alb</hi>, is relatively skewed towards text outside direct speech, with only about 18% of tokens in a direct speech.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5cd-a66a-7b59-c12c3e1ae61c" />the following experiments use both labelled subsets described above, the large <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus<ref target="ftn3" n="3" /></hi> and the smaller <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">alb</hi>. for all experiments, quotation marks are removed from the texts. this is done to avoid training models that rely only on the formal style of qualifying direct speech, but also consider implicit signs like the use of first person verbs or speech words.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.2	p	we conducted experiments on two different levels, starting with a sentence classification task, which is then refined to detect direct speech on word-level.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.3	div2	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.3.1	p	in our first classification task, documents are split into sentences and vectorised by storing each sentence in a bag-of-words representation. to create a baseline for measuring the advantage using deep learning for direct speech recognition, we compared the performance of traditional machine learning algorithms on our labelled datasets. training and testing some of the most common machine learning classifiers to detect sentences containing at least one word of direct speech leads to an accuracy of <hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">0.85 </hi>using logistic regression; for more results see table 1.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.3.2	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5ce-5a3f-4208-237d90c31d50" />using the same setting and replacing machine learning with a combination of recurrent and convolutional neural networks (see chollet 2017 and goodfellow 2017) ended up with an accuracy of <hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">0.84</hi>.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.3.3	p	<figure xmlns="http://www.tei-c.org/ns/1.0"> <graphic url="konle_leonard_analysing_direct_speech_in_german_novels-100002010000042c00000104b331e8b55ee32983.png" /> </figure>
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.3.4	p	since we noticed that three of our classifiers all ended up with about the same score, we decided to give the task to two human annotators to establish an upper bound. we selected 250 sentences for manual annotation and again removed all quotation marks. both annotators ended up with an accuracy comparable to that of the best machine learning methods, 84% and 82.8% respectively. from this result we concluded that it is not expedient to further optimise the sentence classification task, as we had already reached human-level accuracy.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4	div2	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4.1	p	because of the results from the previous section, we decided to modify our task to a word-level prediction, which enables us to include more context by ignoring sentence boundaries and at the same time make more fine-grained predictions. in this second classification task, each word is to be classified separately as inside or outside a direct speech. as baseline for this task, we trained a linear chain conditional random field (crf) that was only given the word itself and its part-of-speech tag. this crf stagnated at a comparably low accuracy of 0 <hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">.71</hi> using cross-validation on the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi>.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4.2	p	since our goal was to provide the classifier with more context, we chose to use an architecture based on recurrent neural networks, which are able to deal with relatively large contexts. our assumption here is that, for a good classification, we need context from both before and after the target word itself, as markers for direct speech can be found at the beginning or the end of the direct speech. we thus designed a two-branch network, visualised in figure 1. this network receives as input a text-segment, specifically the target word in its context. the words of the input are then passed through an embedding layer and split into two parts, where the first part contains the context up to the target word and the second part contains the context following the target word. the target word itself is contained in both parts. each part is passed through three separate lstm-layers. in the future-branch, the context is passed through the layers in reverse, so that the target word is the last word to be read in both branches. the lstm-layers in the past-branch are stateful and can therefore theoretically retain the entire context of the novel up to the target word. the outputs of the final lstm-layer of both branches are concatenated. the final prediction is made based on this concatenation by a fully connected layer.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4.3	p	in our best setup, we used 60 words before and after the target word as context.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4.4	p	training on one half of the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi> and evaluating on the other half, this setup yielded an accuracy of <hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">0.83</hi>. training on the full <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi> and evaluating on the manually annotated <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">alb</hi> reached an even better accuracy of <hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">0.90</hi>. <lb xmlns="http://www.tei-c.org/ns/1.0" />
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.4.4.5	p	<figure xmlns="http://www.tei-c.org/ns/1.0"> <graphic url="konle_leonard_analysing_direct_speech_in_german_novels-fig1.png" /> <head> <lb />figure 1: architecture of recurrent network to detect direct speech. </head> </figure>
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5cf-1167-4108-44c957131b2c" />in the following experiments, we used the model based on the architecture described above. we trained this model on the <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">kerncorpus</hi> and used it to detect direct speech in the complete corpora <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">pd</hi>, <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">lb</hi> and <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">hb</hi>. here, we describe our findings on these corpora.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.2	div2	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.2.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5cf-6193-7f0a-062338eea011" />figure 2 shows the ratio of direct speech in german novels from 1800 till 1900 based on the texts from corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">pd</hi>. the regression line indicates a decline of direct speech over time; at the same time, we can observe a decrease of variance. the strong variations between certain years, especially in the early 19th century, are caused by low numbers of provided texts (see fig. 3). for instance, the peak in 1805 can be explained by the first publication of denis diderots ”herrn rameaus neffe”, a philosophical dialogue-based novel.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.3	div2	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.3.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5cf-f881-8f33-e5d9f49c797b" />there is an assumption in literary studies that a huge amount of direct speech is an indicator of low brow fiction. figure 4 shows the ratio of direct speech between corpus <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">lb</hi> and <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">hb</hi>. while the mean usage of direct speech is nearly equal in both groups, the high brow literature is far more variable.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.5.3.2	p	this finding is contrary to the assumption mentioned above. we propose that, while there is no clear difference in the average use of direct speech between high and low brow literature, authors in high brow literature are far more flexible in choosing how much direct speech they use in their novels. low brow literature, on the other hand, is expected to have a rather constant amount of dialogue.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.6	div1	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.6.1	p	<anchor xmlns="http://www.tei-c.org/ns/1.0" xml:id="id_docs-internal-guid-68b34743-f5d0-46e7-1731-31344ad11bf6" />in this paper, we introduced a neural network architecture that is able to learn the classification of direct speech by training on weakly labelled data. this network works purely on the raw text of a novel by taking into account a relatively large context. we also demonstrate that training on weakly labelled data leads to satisfying results.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.6.2	p	while an accuracy of 0.9 is remarkable, there is still need for optimisation. recent developments in the performance of neural networks by adding an attention mechanism (see rush 2015) could improve the results.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:1.6.3	p	we used our neural network to analyse the distribution of direct speech over time and genres. besides algorithmic refinements, there is a lot of potential in adding more text to our corpus and refining metadata to allow more sophisticated research questions like differences between or development of direct speech in certain genres.
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2	back	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.1	notes	<note xmlns="http://www.tei-c.org/ns/1.0" xml:id="ftn1" n="1" place="foot"> <ptr target="https://textgrid.de/digitale-bibliothek" /> </note> <note xmlns="http://www.tei-c.org/ns/1.0" xml:id="ftn2" n="2" place="foot"> <ref target="https://gutenberg.spiegel.de/">https://gutenberg.spiegel.de</ref> </note> <note xmlns="http://www.tei-c.org/ns/1.0" xml:id="ftn3" n="3"> <anchor xml:id="id_docs-internal-guid-5e3754e0-f67e-59e2-5068-babb8eab0c70" /> we cannot use the remaining texts for either training or evaluation, as we do not have any reliable source of labels for these texts. </note>
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2	bibliogr	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1	listBibl	
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1.1	bibl	<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">brunner, annelen</hi> (2013): “automatic recognition of speech, thought, and writing representation in german narrative texts”, in <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">literary and linguistic computing. vol. 28 (2013).</hi>
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1.2	bibl	<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">chollet, francois</hi> (2017): “deep learning with python”. manning publications. new york. (preprint: https://www.manning.com/books/deep-learning-with-python)
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1.3	bibl	<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">goodfellow, ian / bengio yoshua / courville, aaron</hi> (2016): “deep learning”. mit press. (url: <ref xmlns="http://www.tei-c.org/ns/1.0" target="http://www.deeplearningbook.org/"> <hi rend="underline">http://www.deeplearningbook.org</hi> </ref>)
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1.4	bibl	<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">rush, alexander m. / chopra, sumit / weston, jason</hi> (2015): “a neural attention model for abstractive sentence summarization”. <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">arxiv preprint arxiv:1509.00685.</hi>
urn:cts:dhd:2018.konle_leonard_analysing_direct_speech_in_german_novels:2.2.1.5	bibl	<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">scheible, c., klinger, r. & padó, s.</hi> (2016): “model architectures for quotation detection”, in <hi xmlns="http://www.tei-c.org/ns/1.0" rend="italic">proceedings of acl (p./pp. 1736–1745).</hi>