QuoteKG: A Multilingual Knowledge Graph of Quotes

Quotes of public figures can mark turning points in history. A quote can explain its originator's actions, foreshadowing political or personal decisions and revealing character traits. Impactful quotes cross language barriers and influence the general population's reaction to specific stances, always facing the risk of being misattributed or taken out of context. The provision of a cross-lingual knowledge graph of quotes that establishes the authenticity of quotes and their contexts is of great importance to allow the exploration of the lives of important people as well as topics from the perspective of what was actually said. In this paper, we present QuoteKG, the first multilingual knowledge graph of quotes. We propose the QuoteKG creation pipeline that extracts quotes from Wikiquote, a free and collaboratively created collection of quotes in many languages, and aligns different mentions of the same quote. QuoteKG includes nearly one million quotes in $55$ languages, said by more than $69,000$ people of public interest across a wide range of topics. QuoteKG is publicly available and can be accessed via a SPARQL endpoint.


Introduction
Quotes of public figures provide valuable information to understand their thoughts and attitudes, potentially leading to historically important actions, and thus serve as a crucial component in exploring world history [19]. Table 1 provides three examples of quotes, with the first one emphasising the relevance of historic quotes: in 1930, Winston Churchill recognised the value of reading them. The second example in Table 1 illustrates the relevance of quotes in world history: During a press conference in 2015, the German chancellor Angela Merkel said "Wir schaffen das" ("We can do this") when the European migrant crisis unfolded and Germany prepared for the reception of refugees from Northern Africa and the Middle East. Since then, these three words defined Merkel's political course in the migrant crisis -and led both to a welcoming culture as well as the rise of nationalist protests and right-wing political parties [21,23].
Given this potential impact of words, it is of utmost importance to provide sources to quotes and to dismiss hoaxes [18,28]: The third example in Table 1 is a famous quote that has been attributed to different people, including Albert Einstein, Benjamin Franklin, and Mark Twain, but has not actually been said by any of them. 3 In general, a quote can be mentioned in different sources, and mentions can deviate. For example, "Wir schaffen das" might be mentioned as "We can do this" or "We will make it!" in English translations. Therefore, there is a need to align mentions to the same quote and to provide context information such as the source and description (e.g., "during a press conference"). In this paper, we introduce QuoteKG -a new knowledge graph that provides nearly one million quotes said by more than 69, 000 persons of public interest in 55 languages. Quotes in QuoteKG come with detected sentiment and context such as their origin dates and sources. They are interlinked with their originators and other entities such as persons or events they refer to. Different mentions of the same quote are aligned across languages.
The creation of a knowledge graph covering quotes in many languages and their contexts faces several challenges detailed in the following.
-Lack of context: Most quote collections [10,24,34] lack context information and solely provide the quotes and their originators. To provide more context information in QuoteKG, we extract quotes from Wikiquote -a "free online compendium of sourced quotes from notable people" 4 . -Tedious extraction process: Even though Wikiquote is a semi-structured resource, extraction of quotes and contexts is a tedious process. In particular, we must design an extraction pipeline that is flexible across languages and adopts their characteristics. For example, it is necessary to differentiate the quotes not said by a person, but said about a person (e.g., English: "Quotes about Albert Einstein", German: "Zitate mit Bezug auf Albert Einstein"). -Missing alignment of quote mentions: As quote mentions in Wikiquote are not linked across languages, another important step is cross-lingual quote alignment which we perform using a language-agnostic transformer model that we evaluate on a ground truth set of manually aligned quote clusters.
Our contributions are as follows: (i) We propose a schema to represent quotes and context information. (ii) We propose an extraction pipeline that extracts quotes, their mentions and context information from all Wikiquote language versions. (iii) We align quote mentions across languages using a cross-lingual language model. (iv) We make QuoteKG publicly available 5 .
The remainder of this paper is structured as follows: First, we describe the impact of QuoteKG in the fields of Semantic Web, Natural Language Processing, Digital Humanities and others in more detail. Then, in Section 3, we describe the schema adopted for QuoteKG. In Section 4, we describe the QuoteKG creation pipeline. In Section 5, we provide statistics and examples of QuoteKG, followed by information about the availability and maintenance in Section 6. Section 7 gives an overview of related work. Finally, we provide a conclusion in Section 8.

Potential Impact
QuoteKG contains quotes, a new type of information that is, to the best of our knowledge, not yet present in existing knowledge graphs. Therefore, Quote-KG can potentially attract new audiences from several fields such as Digital Humanities and Natural Language Processing. While existing cross-domain or event-centric knowledge graphs such as Wikidata [36], DBpedia [2], and Even-tKG [12] target the representation of real-world entities, including persons of public interest and important events, they scarcely represent what people actually said -even though this information reflects persons' characteristics and can lead to an understanding of how particular events unfolded in the real world. Instead, facts about persons in knowledge graphs (e.g., properties representing birth dates, marriages, and awards received) without a doubt represent relevant facts in a person's life but typically do not reveal personal traits or surprising insights. Existing corpora of quotes like Quotebank [34] and the QUOTES500K dataset [10] provide large collections of English quotes. In contrast to these corpora, QuoteKG is a knowledge graph and provides societal relevant quotes and contexts in 55 languages, links them to other knowledge graphs, and aligns quote mentions across languages.
Potential applications of QuoteKG are manifold: (i) First and foremost, QuoteKG can add a new dimension to the exploration and investigation of the lives of public figures. While the creation of biography timelines from knowledge graphs has been studied in the past [1,13], such timelines do not consider the inclusion of quotes. QuoteKG can help to enrich such timelines with relevant quotes to make them more lively and informative. (ii) Similarly, the analysis of quotes related to a specific topic over time can support research in the fields of Digital Humanities, and can be used to gauge public opinion regarding specific events. For example, there have been analyses of how social movements and global events affect language [14] and how the words used by public persons carry political backgrounds [35]. (iii) Quotes also play an important role when observing information propagation [31] and the bias potentially caused by one-sided selection of quotes [25]. (iv) QuoteKG can also serve as an additional resource for machine translation, given that it contains 38, 931 quotes with mentions in different languages. (v) QuoteKG can help answering questions such as "Who said 'yes, we can' ?". (vi) QuoteKG contains 13, 104 quotes labelled as misattributed or falsely claimed. They can be used as a resource for understanding the propagation of false or misleading information [28]. (vii) Finally, QuoteKG can take quote collections to a new level: There are plenty of websites available that provide collections of quotes 6 , typically monolingual and primarily for entertainment purposes (e.g., images of inspirational quotes or quote mashup games 7 ). The context information in QuoteKG can support the exploration and the search for quotes and provide important information surrounding a quote, and, as such, broaden the user's horizon.

QuoteKG Schema
The goal of the QuoteKG schema is to model quotes, their relationships with persons and other entities, as well as their different mentions, e.g. translations, typically in different contexts. To this end, QuoteKG is based on an extension of the schema.org vocabulary that provides a so:Quotation 8 class which is re-used. According to the schema.org description, the so:Quotation class models quotes that are "Often but not necessarily from some written work" and can also refer to a "Quotation from an Event" 9 . Therefore, it fits well to our concept of a quote in QuoteKG. However, we extend the schema with a new class qkg:Mention which models the different mentions of a quote. Fig. 1 presents QuoteKG's schema. Its classes are described in the following.  -Person: Each quote in QuoteKG is assigned to a person modeled as so: Person. For persons, QuoteKG provides additional type information (e.g., Politician) plus owl:sameAs relations to Wikidata and the different DBpedia and Wikiquote language editions. -Quote: In QuoteKG, a resource typed as so:Quotation refers to the unique event of something being said by a person of public interest (so: spokenByCharacter) at a specific point in time (so:dateCreated). A quote may also refer to other entities (so:mentions) of any type. -Mention: A quote can be mentioned in different contexts: For example, there may be translations of the quote in different languages, alternative records of the same quote, or different contexts that a quote is extracted from. Therefore, we introduce the class qkg:Mention. Mentions can be related to one or more qkg:Context objects. -Context: The context of a mention provides additional attributes that come together with the specific mention. For example, its origin (e.g., a reference to a specific interview) and the original source (e.g., a link to a news website).
To model context, we create the class qkg:Context. -Sentiment: For each quote, we provide its sentiment using the Onyx ontology which is used for describing emotions [29]. A quote is assigned a score for a specific emotion category ("neutral", "negative" or "positive").   Table 1 is connected to two instances of qkg: Mention, one representing a German mention, the other one an English one ("We can do this"). Both mentions come with additional context information.

Extraction and Alignment of Quotes
This section describes the input data and the implementation of the four main steps of the QuoteKG creation pipeline shown in Fig. 3.

Wikiquote
We base QuoteKG on Wikiquote -an online collection of quotes 10 . Wikiquote has a similar structure to Wikipedia: Independent versions of Wikiquote exist for * '''Falling in love is not at all the most stupid thing that people do | but gravitation cannot be held responsible for it.''' ** Jotted (in German) on the margins of a letter to him (1933), p. 56 {{Citation|Tomber amoureux n'est pas du tout la chose la plus stupide que font les gens | mais la gravitation ne peut enêtre tenue pour responsable. |original=Falling in love is not at all the most stupid thing that people do | but gravitation cannot be held responsible for it.|langue=en}} Each Wikiquote page is formatted using the MediaWiki markup 13 and contains semi-structured content that includes the person's description, sections with quotes, references and more. The quotes are given in one of the following representations: in the traditional MediaWiki markup as shown in Fig. 4 or using pre-defined templates that allow for a more structured definition of keyvalue pairs. For example, Fig. 5 shows the key-value pair (key: Citation, value: Tomber amoureux...).
While there are links between the pages describing persons in different languages, quote mentions are not linked across languages. Fig. 4 and Fig. 5 show two mentions of the same quote by Albert Einstein. The first is from the English Wikiquote and shows an English quote, the second one from the French Wikiquote is given in French and English. The original German quote is not available in these two language versions.
In general, one can observe a large imbalance in Wikiquote regarding the covered persons and the number of quotes in different language versions. This imbalance can often be explained by the different sizes of Wikiquote language versions and the difference in the cultural significance of a person in one language community compared to another. For example, there exists a French page with 35 quotes and an Italian page with 2 quotes of the former footballer Michel Platini who used to play in Italy, but there is no English page. This imbalance also implies that there is no guarantee that Wikiquote will contain the original language version of a quote. QuoteKG can have multiple quote mentions of the same quote through cross-lingual quote mention alignment.

Extraction of Page Trees
In the beginning, our QuoteKG creation pipeline processes all Wikiquote language editions with at least 50 pages, excluding Simple English 14 and selects all pages about persons. From each Wikiquote page about a person, we create a page tree. The page tree consists of section titles plus quotes and contexts. An example page tree is presented in Fig. 6.

Identification and Enrichment of Quotes
In the second step of the QuoteKG creation pipeline, the page trees are transformed into a set of quotes with contextual information. To this end, we specify language-specific rules and enrich quotes and contexts with additional metadata.
To identify quotes, we first define a language-specific list of section titles denoting quotes (e.g., "Citations", "Zitate", "Citazioni") and contextual information (e.g., "útskýring", "Viitattu", "vydavatel"). In addition, we collect a list of template types representing quotes and consider all child nodes of section titles as quotes. From section titles and templates, we further gather the following: -Dates: We identify the dates of quotes from a pre-defined list of template keys (e.g., "année d'origine" in French) for quotes extracted from templates. If such dates are not available or when dealing with quotes not extracted from templates, we extract dates from the section titles above the particular quote in the page tree and the contexts below the quote. We select the time expression with the highest level of precision (e.g., we select May 2020 over 2020). In case of conflicts, no date is chosen. -Veracity: To reflect the authenticity of quotes and their contextual information, we capture whether a quote has been misattributed to the person. In Wikiquote, misattributed quotes are grouped into specified sections. We identify such sections with a manually created list of regular expressions (e.g., "Misattributed" (English) and "Fälschlich zugeschrieben" (German). -Sources: Often, context contains links to websites where the quote was reported. We collect such external links from templates and from the markup. -Linked entities: Quotes can be linked to entities such as other persons or organisations. We collect such links from templates and the markup. For all persons and entities identified during this process, we extract additional information regarding their labels and types from DBpedia and Wikidata.

Cross-lingual Alignment of Quote Mentions
After identifying and enriching quotes, we need to detect which of them represent mentions of the same quote said by a person of public interest. This task of crosslingual alignment of quote mentions is treated as a clustering task at the end of which each cluster represents a quote with a set of mentions.
In detail, the clustering task is performed for each person in isolation. Given a person's quote mentions in a set of languages, we aim at creating clusters of highly similar mentions. To derive a similarity between two mentions, potentially from different languages, we compute the cosine similarity of sentence embeddings derived from the mentions' texts. As an embedding model, we use a language-agnostic transformer model pre-trained on millions of multilingual paraphrase examples in more than 30 languages, namely XLM-RoBERTa [8].
The ability of such models to adapt to previously unknown languages has been shown in [16]. Given such embeddings and the cosine similarity function, clustering is performed by detecting communities of quotes using a nearest-neighbour search. To do so, we chose UKPLab's Fast Clustering algorithm 16 that is optimised towards efficient similarity computations of our embeddings.
To aggregate the sentiments of all mentions in a cluster, we take the most frequent sentiment category and average over the scores of that category.

RDF Triples Creation
After identification of quotes and their contexts and cross-lingual alignment, we transform them into RDF triples following the schema presented in Fig. 1.

Implementation
We use the MWDumper 17 to process the Wikiquote XML dumps and parse the single pages given in the Wikipedia markup using the Bliki engine 18 . For lan-

Statistics, Evaluation, Examples & Web Interface
In this section, we first provide general statistics of QuoteKG, evaluate the crosslingual alignment and present example queries.

Statistics
In total, QuoteKG contains 880, 878 quotes with 961, 535 quote mentions. For 411, 912 mentions, context is available. Table 2 provides detailed statistics for selected languages. QuoteKG covers both high-resource languages such as English (271, 541 quote mentions from 19, 073 persons) and Italian (146, 103 quote mentions from 18, 803 persons), as well as low-resource languages such as Welsh (508 quote mentions from 239 persons).

Evaluation of the Cross-lingual Alignment
We evaluate the quality of the cross-lingual alignment of quote mentions by comparing to a ground truth of correctly clustered mentions. Creating such a ground truth is a tedious process due to the large amount of possible clusterings and the number of pairwise comparisons 23 . We have selected eight persons with quotes in English, German and Italian and manually clustered their mentions. Ground truth clusters were then compared to the QuoteKG clusters by viewing the clustering process as a series of decisions for each of the pairs of mentions [30]. For example, we consider three positive pairs for a quote mentioned in three languages: (Mention 1 , Mention 2 ), (Mention 1 , Mention 3 ), (Mention 2 , Mention 3 ). Table 3 shows the results of this evaluation: Cross-language alignment in QuoteKG shows an average precision of 1.0 and an F 1 score of 0.99 for this ground truth data set. Following the imbalance of Wikiquote's coverage described in Section 4.1, there is a high number of true negatives, i.e., the majority of quotes are only mentioned once in all Wikiquote language versions. In total, there are only two mentions which are not clustered together but should have been. All the other clusters are correct. Our ground truth set of manually aligned quote clusters is available on the QuoteKG website.

Example Queries
In this section, we present two example queries demonstrating how to use Quote-KG as a collection of quotes and as a resource to conduct research on the misattribution of quotes. 23 When considering a person that has 10 quotes in 5 languages each, there are QuoteKG as a Collection of Quotes and their Originators Listing 1.1 shows a SPARQL query that returns the five persons with the most quotes inQuoteKG. Table 4 shows these persons together with the number of quotes. Without surprise, the persons with most quotes are philosophers and writers, including Friedrich Nietzsche and Oscar Wilde, plus Albert Einstein, known for many (misattributed) quotes [28]. Verification of Quotes Misinformation on the Internet has become an increasingly important problem and requires methods that classify the veracity of information [33] and benefit from knowledge graphs such as ClaimsKG that provide annotated and erroneous facts [32]. While ClaimsKG provides wrong claims stated by persons extracted from fact-checking sites, QuoteKG has quotes labelled as wrongly attributed to persons, thus a different type of misinformation. The query shown in Listing 1.2 returns quotes of Albert Einstein that are marked as misattributed in QuoteKG (see Table 5), together with context information. Such context information can be a valuable resource for explaining misattribution in the case of quotes.

Web Interface
On  quotes in selected languages. An example of this interface is shown in Fig. 7 which display Portuguese and English quotes of Johann Wolfgang von Goethe.

Availability
Availability: The QuoteKG website 24 provides access to a description of Quote-KG and its schema, to the SPARQL endpoint, to data downloads and will provide a canonical citation to this paper. QuoteKG is licensed under the Creative Commons Attribution Share Alike 4.0 International 25 license. Persistent access to the QuoteKG triple files is provided through an upload to the zenodo reposi-  Sustainability plan: To account for updates in all Wikiquote language editions, we plan to release new versions of QuoteKG twice a year. To do so, we deploy a script that covers the entire pipeline depicted in Fig. 3, from the download of Wikiquote dumps in each language until the creation of triples.
Adherence to standards: QuoteKG is modeled through the Resource Description Framework. Its schema is an extension of schema.org. We provide a machine-readable description of QuoteKG using the VoID vocabulary 29 . Quote-KG adheres to the Linked Data Principles: resources can be looked up through their URIs and they are interlinked with Wikidata and DBpedia.

Related Work
In this section, we give an overview of other corpora and knowledge graphs containing quotes, other usages of Wikiquote and about cross-lingual alignment.
Quote Corpora Many collections of quotes have been created and maintained, mainly mono-lingual and without semantic annotations. Since the release of its first edition in 1941, The Oxford Dictionary of Quotations [20] aims at providing "the wit and wisdom of past and present" with a focus on the provenance of quotes. Provenance of quotes is also an indispensable criterion in the Book of Fake Quotes [4]. There are few machine-readable monolingual quote collections 30,31 [10,24,34]. These corpora are typically monolingual and extracted from news. Consequently, while they may have a large amount of quotes, they 26 https://zenodo.org/record/4702544 27 https://github.com/tkuculo/QuoteKG 28 https://opensource.org/licenses/MIT 29 https://www.w3.org/TR/void/ 30 https://www.kaggle.com/akmittal/quotes-dataset 31 https://github.com/JamesFT/Database-Quotes-JSON lack a mechanism to ensure societal relevance of quotes as in Wikiquote. As a knowledge graph, QuoteKG enables easy access to quotes and rich metadata.
Quotes in Knowledge Graphs While DBQuote [26] allows user annotations of quotes extracted from Twitter and Wikiquote through an ontology, it only covers two languages (English and Korean) and has not been made available. To the best of our knowledge, QuoteKG is the first publicly available knowledge graph of quotes. Consequently, quotes have only been insufficiently covered in the Semantic Web: for example, Wikidata [36] contains less than 400 instances of the class "Phrase" 32 that are attributed to an author or creator -most of them only consisting of few words (e.g., "cogito ergo sum" and "covfefe"). Event-centric knowledge graphs such as EventKG [12] provide an understanding of the human history and world-shaking events. They do not include include quotes that complement the deeds of public figures. Many applications based on knowledge graphs (e.g., for exploring the lives of persons of public interest [1,13]) could immediately profit from the inclusion of quotes.
Wikiquote Until now, Wikiquote has rarely been used as a research corpus, presumably due to the required but tedious extraction process. One example is the work by Buscaldi et al. who manually tagged quotes of the Italian Wikiquote as humorous or not, and used their annotated corpus for training models for humour recognition [5]. Giammona et al. analysed the spread of ancient quotes in today's Web through Wikiquote [9] and Wikiquote was used for training the chatbot Poetwannabe [6]. With QuoteKG, we foresee to ease the access to quotes for a wide range of research questions.
Cross-lingual Alignment Several studies have shown that different languages share similar statistical properties that can be used to learn cross-lingual alignments between two languages, even without relying on any form of bilingual supervision [7]. While most works and datasets address bilingual alignment [11,15,17], there are only few works on cross-lingual alignment [22]. QuoteKG focuses on the specific task of cross-lingual alignment of quote mentions.

Conclusion
In this paper, we presented QuoteKG -a novel, multilingual knowledge graph of quotes. We have presented the QuoteKG schema based on schema.org as well as a pipeline that extracts quotes from the Wikiquote corpus and aligns them across languages. QuoteKG is publicly available and includes nearly one million quotes quotes in 55 languages, said by nearly 69, 000 people of public interest.