Towards Bootstrapping a Chatbot on Industrial Heritage through Term and Relation Extraction (2022)

Abstract: We describe initial work in developing a methodology for the automatic generation of a conversational agent or ‘chatbot’ through term and relation extraction from a relevant corpus of language data. We develop our approach in the domain of industrial heritage in the 18th and 19th centuries, and more specifically on the industrial history of canals and mills in Ireland. We collected a corpus of relevant newspaper reports and Wikipedia articles, which we deemed representative of a layman’s understanding of this topic. We used the Saffron toolkit to extract relevant terms and relations between the terms from the corpus and leveraged the extracted knowledge to query the British Library Digital Collection and the Project Gutenberg library. We leveraged the extracted terms and relations in identifying possible answers for a constructed set of questions based on the extracted terms, by matching them with sentences in the British Library Digital Collection and the Project Gutenberg library. In a final step, we then took this data set of question-answer pairs to train a chatbot. We evaluate our approach by manually assessing the appropriateness of the generated answers for a random sample, each of which is judged by four annotators.

## introduction conversational agents or 'chatbots' are a convenient way of making information available, as can be witnessed from the significant growth of chatbots used in all kinds of settings, from banks to public services. 1 also in cultural heritage settings, chatbots are now being employed more and more to interact with visitors to websites and virtual exhibi-figure 1 : example of a "mill race" or "mill run" that was used to provide continuous water power to mills (image: author). in this paper, we describe our work towards developing a methodology where we focus on term and relation extraction for end-to-end text gener- ## related work term extraction for conversational agents was presented by @xcite and applied for customer service dialogue in the fintech domain. the authors provide insights on term extraction for automatic generation of taxonomies from customer service dialogue data, which can contribute to the conversational agent use case by taking advantage of existing dialogues between customers and agents as learning data about the domain. similarly, atzori et al. (2017) create a recommender system within the travel domain, leveraging lightweight access through chatbots to support travellers during their holiday stay. @xcite presents an approach for extracting question-answer pairs as chat knowledge from online discussion forums to train a chatbot for a certain domain. the authors use an svm classifier to identify and rank relevant questionanswer pairs based on content similarity. domainspecific terms have been identified as a key part of understanding user requests in chatbot interaction @xcite . chao et al. (2021) study chatbot development using a systematic patent analytic approach. they apply text-mining techniques, including document term frequency analysis for key terminology extractions, a clustering method for identifying the subdomains, and latent dirichlet allocation (lda) for finding the key topics of a patent set. abu-shawar and atwell (2016) focus on transforming corpora to a specific chatbot format, which is used to retrain a chatbot system. for this task, the authors use different dialogue corpora, i.e., such as the british national corpus of english (bnc) and the quran, which is a monologue corpus where verse and following verse are turns. the main goal of this automation process is the ability to generate different chatbot prototypes that communicate in different languages based on the corpus. in contrast to previous work, our approach does not leverage classification methods to align a question to a predefined intent or answer, respectively. additionally, leveraging term and relation extraction on a relevant corpus of language data, our approach is not limited to existing resources, such as the ubuntu dialogue corpus @xcite , data sets drawn from twitter @xcite or reddit @xcite , needed to train a conversational agent. ## data this section provides insights on the resources used to build a chatbot in the domain of industrial heritage in the 18th and 19th centuries, i.e. the galway data set, british library digital collection and the project gutenberg library. ## methodology within our work, we first leverage the galway data set to extract most relevant terms and relations between them in the domain of industrial heritage. we use these terms and relations in the next step to extract sentences from the bldc and the project gutenberg corpus containing these terms and relations. ## experimental setup in this section, we give an overview of the saffron framework used for term and relation extraction. we leverage these terms to query the bldc corpus through the curatr online platform. furthermore, we provide information on opennmt and the architecture of the trained sequence-to-sequence neural network. finally, we provide insights on the evaluation approach. ## conclusion and future work we described an approach towards the bootstrapping of a chatbot in the cultural domain through the application of readily available tools for term and relation extraction and natural language generation. the evaluation shows that the end-to-end neural model produces acceptable results when asking questions about the industrial heritage of the 18th and 19th centuries. nevertheless, the approach does require more extension and refinement to be useful for automatic chatbot development. the current limitations of the approach are in data collection, term and relation extraction and eval-question #1 tell me about a cotton and a sawmill generated answer a sawmill or lumber mill is a facility where logs are cut into lumber. question #2 what is the relation between a gate and a river? generated answer on the clare side of the river, at the foot of thomond gate 587 limerick. question #3 tell me about a city and a lock generated answer 287 the gates of the city to be put in repair with locks and keys question #4 what is the relation between a log and water? generated answer availability of railroad transportation for logs and lumber encouraged building of rail mills away from navigable water. question #5 what is the relation between a lumber and a paper? generated answer the larger pieces of wood that wo n't make lumber are chipped into wood chips and provide a source of supply for paper mills. question #6 what is the relation between a lumber and a mill? generated answer a sawmill or lumber mill is a facility where logs are cut into lumber. question #7 what is the relation between a boat and a wheel? generated answer @xcite these floating mills had a wheel that was attached to a boat moored in a fast flowing river. question #8 tell me about a machine and water generated answer the water power could be used for driving the splint and box-making machines. question #9 tell me about a lock and water generated answer the lock is filled with water from upstream.