Scent Mining: Extracting Olfactory Events, Smell Sources and Qualities (2023)

Abstract: Olfaction is a rather understudied sense compared to the other senses. In NLP, however, there have been recent attempts to develop taxonomies and benchmarks specifically designed to capture smell-related information. In this work, we further extend this research line by presenting a supervised system for olfactory information extraction in English. We cast this problem as a token classification task and build a system that identifies smell words, smell sources and qualities. The classifier is then applied to a set of English historical corpora, covering different domains and written in a time period between the 15th and the 20th Century. A qualitative analysis of the extracted data shows that they can be used to infer interesting information about smelly items such as tea and tobacco from a diachronical perspective, supporting historical investigation with corpus-based evidence.

## introduction in recent years, research on sensory-related analysis of texts has become more and more relevant within the nlp community. indeed, studies in linguistics, primarily aimed at assessing how sensory language differs across languages and how the different senses are described and compared @xcite @xcite , have then paved the way for more computationallyoriented analyses, aimed for example at structuring the sensory vocabulary in machine-readable taxonomies @xcite @xcite , using distributional semantics to explore sensory blending @xcite , or extracting sensory information about cities using data from social media @xcite . several works have dealt with olfaction, which is a sense that is traditionally less represented in the vocabulary of western european languages and in texts @xcite , making it a very interesting domain to investigate with computational means. the first work trying to capture smelly experiences using two semi-supervised approaches was presented in @xcite , while annotation guidelines and a multilingual benchmark for olfactory information have been recently released @xcite . along this research line, we present a supervised system for olfactory information extraction in english trained on the above benchmark. we cast this task as a token-classification problem, labelling smell words that evoke olfactory events and two related semantic roles: smell sources and qualities. we present not only a standard evaluation by measuring f1 on each element, but also a qualitative analysis, by applying our system to four historical corpora in english and manually interpreting the extracted information. the code and the model used to extract olfactory information from texts are available at https:// github.com/dhfbk/scent-mining . ## dataset in order to train a system for olfactory information extraction, we use the english benchmark presented in @xcite . 1 the benchmark contains 85 documents, distributed evenly over a time period between 1620 and 1920 and covering the benchmark was annotated with olfactory information following the guidelines presented in @xcite . this scheme is inspired by frame semantics @xcite and the framenet annotation project @xcite ), foot_1 whose goal is to capture situations and events present in texts. in the benchmark that we use for our experiments, only one event type was considered, i.e. olfactory event, which according to the guidelines can be evoked by a smell word, or lexical unit (lu). such smell word may be connected to one or more semantic roles (socalled frame elements, fes) participating in such event. english smell words include nouns such as 'stink', 'odour','stench','whiff', verbs such as 'to smell','to reek','to sniff', adjectives such as 'scented','odorous','reeking', and adverbs such as 'pungently'. the benchmark contains 1,530 olfactory events. concerning semantic roles, the annotation scheme foresees nine of them, namely smell source, quality, evoked odorant, odour carrier, perceiver, time, location, effect and circumstances. the most frequent ones are smell source and quality, which are both represented by respectively 1,313 and 1,084 instances in the benchmark, while all the others are much more sparse. for this reason, we include in our first system for olfactory information extraction only the recognition of smell words, smell source and quality, leaving the other roles to future extensions. we report in ## system for olfactory information extraction the model for olfactory information extraction has been designed as a token classification task, i.e. a natural language understanding task in which a label is assigned to each token in a given text. while past works in semantic frame parsing usually treated lexical unit detection and frame element annotation as two separate tasks @xcite , we consider them both at the same level and build a single classification model. we use the iob labeling data format, in which tokens in a span are marked with inside-outside-beginning of smell-related elements. the model labels each token as o (outside), b-frame_element (beginning of a span ## olfactory information extraction we launch the bert-based model on a set of historical corpora of english. our goal is to analyse the smell-related information extracted by our system and to perform some qualitative study of the results. we focus on four freely available corpora: project gutenberg: foot_5 a volunteer effort to digitize and archive cultural works, it contains different repositories, mainly in the literary domain (4,943 books, 366m tokens). the royal society corpus: foot_6 a repository of scientific periodicals issued between 1665 and 1869 (9,782 documents for a total of 31m tokens); a pre-processed subset of the old bailey papers dataset, foot_7 containing the court proceedings published between 1720 and 1913 (638 books 3.1m tokens). early english books online (eebo), foot_8 containing documents published between 1475 and 1700 in different domains such as literature, philosophy, politics, religion, geography, history, politics, mathematics (60,329 documents for a total of 1.4b tokens) in ## case study: perception shift inspired by past approaches to semantic shift detection, we examine potential changes in the way a specific smell source is described in texts. we argue that these variations may reflect a shift in the perception of specific smells, as already highlighted in historical research using qualitative approaches @xcite . in our analysis we compare the meaning of the smell sources before and after 1800. we select this period because it represents a significant turning point in the cultural attitudes towards scent, especially in england. the sense of smell acquired an increasingly social significance and played a role in shaping both individual identities and those of specific places @xcite . for this purpose we split the extracted data in two parts, the first one covering the period from 1500 to 1799 and the second one from 1800 to 1930. to identify perception shifts in the olfactory information extracted from our data, we follow the work by @xcite on semantic shifts. first, we reduce the vocabulary of the text extracted by lemmatizing it with stanza @xcite . then, for each time period, we create an embedding space with fasttext, using the skip-gram model and an embedding size of 100 @xcite . to be able to compare the embeddings from the two time periods, we align the 1800-1930 space to the 1500-1799 one using a shared vocabulary. shifts in the olfactory perception are then detected by computing the cosine similarity between the two embeddings of the same smell source in the two time periods. we focus on smell sources because we aim at analysing which items have undergone a significant change in the way their smell was perceived over time. in particular, we first compute the average similarity between all the smell sources in the two time spans and then we set as threshold for possible semantic shift the average similarity minus the standard deviation. tea: the variation in the context related to this smell can be imputed to the great change in the perception of this beverage from a very exotic one when it first entered europe (around 1630s-1640s) to a central role in the daily domestic life for the majority of europeans (especially dutch and english) in the nineteenth century @xcite . therefore, in the first period it is possible to find references to the flavor of tea as something new and not really pleasant to the european taste (see example 1 below, extracted from our corpus), while by the early 19th century the smell of tea becomes very common in european houses (example 2). as smoking fell out of favor, snuff emerged as the favored method of consuming tobacco @xcite . indeed, by the late eighteenth century, snuff became the fashionable choice over smoking due to the prevailing manner of the period focused on the need to please others @xcite ). snuff's growing popularity provided in fact a more discreet form of tobacco consumption, which significantly reduced the likelihood of offending others with the pungent odor of smoke. this trend is reflected in the data through the frequent references to "pinch of snuff" and "snuff boxes" after 1800. even if the performance of the classifier is not very good in detecting smell sources, we consider these results promising. we plan to improve the system and to increase the amount of training data in the future to further refine our analysis. ## conclusions in this paper we present the first information extraction system able to capture smell events, including smell words, smell sources and qualities. we then apply the system to four english corpora, covering a time period between 15th and 20th century. then, starting from the extracted data, we adapt an existing approach to semantic shift detection to capture which smell sources underwent a change in the way their odour was perceived before and after 1800. we find correspondences between the extracted items and the output of historical research concerning the smell of tobacco and tea. despite the limited amount of data, the results are promising and indicate that this research can yield valuable insights in the area of diachronical sensory analysis. in the future, we intend to broaden the scope of our data and conduct more comprehensive analyses on a greater variety of smell sources.