L exi C lean: An annotation tool for rapid multi-task lexical normalisation (2021)

Abstract: NLP systems are often challenged by difficulties arising from noisy, non-standard, and domain specific corpora. The task of lexical normalisation aims to standardise such corpora, but currently lacks suitable tools to acquire high-quality annotated data to support deep learning based approaches. In this paper, we present LexiClean, the first open-source web-based annotation tool for multi-task lexical normalisation. LexiClean’s main contribution is support for simultaneous in situ token-level modification and annotation that can be rapidly applied corpus wide. We demonstrate the usefulness of our tool through a case study on two sets of noisy corpora derived from the specialised-domain of industrial mining. We show that LexiClean allows for the rapid and efficient development of high-quality parallel corpora. A demo of our system is available at: https://youtu.be/P7_ooKrQPDU .

## introduction garbage in, garbage out is a well known adage in the computer science and machine learning community. in nlp it has become the centre-focus, demanding a task of its own right; namely, lexical normalisation @xcite . lexical normalisation is the task of identifying and normalising non-canonical tokens (e.g. erroneous spelling, acronyms, . . . ) in noisy, non-standard, corpora @xcite . largely made popular after the 2015 acl-ijcnlp workshop on noisy user-generated text (w-nut) @xcite , lexical normalisation has demonstrated marked improvements on down-stream applications such as entity recognition, text classification, and part-of-speech (pos) tagging @xcite @xcite . 1 lexiclean. https://lexiclean.nlp-tlp.org these improvements have centred around the fact that many nlp tools are not amenable to noisy corpora, such as those in micro-blogging domains like twitter @xcite , and in specialiseddomains such as industrial mining @xcite . to date the most popular lexical normalisation corpus is based on english twitter and was released as part of w-nut @xcite . this has resulted in a number of algorithmic contributions to lexical normalisation task with the current state-ofthe-art using ensemble learning methods @xcite . more recently, attention has shifted towards neural techniques that i) contextually normalise tokens based on high-level classifications @xcite , ii) modify and fine-tune large pre-trained transformer based representations @xcite , or iii) perform joint normalisation and sanitisation (e.g. masking sensitive tokens) @xcite . however, neural models typically demand large volumes of high-quality training data, which is not available for the task of lexical normalisation. despite the prevalence of open-source token-level annotation tools @xcite @xcite , there still remains a lack of support for lexical normalisation. a gap in lexical normalisation research currently exists and consists of an absence of large scale annotated corpora and scalable, task-specific tools for their construction. to fill this gap, we introduce lexiclean, an annotation tool for multi-task lexical normalisation that is: i. rapid: enables fast corpus wide multi-task annotation. the remainder of this paper is organised as follows. we define the task of lexical normalisation in section 2 and briefly review related work in section 3. following this, we present and describe key features of lexiclean in section 4. lexiclean's system architecture is then discussed in section 5 with a case study presented in section 6. lastly conclusions are drawn and future work is proposed in section 7. an online demonstration of lexiclean is located at https://lexiclean.nlp-tlp. org and the source code is available under an apache-2.0 license at https://github.com/ nlp-tlp/lexiclean . ## problem formulation lexical normalisation is defined as the mapping of non-canonical, out-of-vocabulary (oov) tokens to canonical, in-vocabulary (iv) forms @xcite . non-canonical tokens are largely a result of i) unconventional and phonetic spelling, ii) improper casing, iii) acronyms, iv) abbreviations and initialisms, v) domain-specific terms, vi) neologisms, and vii) erroneous concatenation or tokenization. this task is akin to grammatical error correction (gec) @xcite , although it does not involve token reordering that is core to gec. lexical normalisation is typically tackled as one of two formulations, either as a sequence-tosequence (seq2seq) @xcite or token classification problem (van der @xcite @xcite . seq2seq structures the learning task similar to neural machine translation (nmt) @xcite whereby an encoder receives a sequence of noisy text, @xmath0, . . . , x n ), and maps it to a decoder which outputs a sequence of normalised text, @xmath1, . . . , y m ). in this format, |x| does not necessarily have to equal |y|. here a variation in sequence length can result from concatenation and tokenization corrections e.g. ("helloworld") → ("hello", "world") or ("hello", "w", "orld") → ("hello", "world"). in contrast, token classification structures the task in a modular fashion where oov candidates are identified and normalised in multiple stages. typically a noisy sequence, x, is mapped to an intermediate sequence of semantic classes, @xmath2, . . . , z n ). token classification can be simple binary classification, l @xmath3, iv }, or comprehensive, l @xmath4, spelling_error, domain_specif ic, acronym}, where l is a space consisting of n pre-defined classes of token categories. after classification, alignment to suitable canonical forms is performed using similarity or distance based measures conditioned on labels in z @xcite . ## related work in the last decade, many open-source annotation tools have been developed for token-level classification tasks such as entity recognition and pos tagging, notably brat @xcite , @xcite , yedda @xcite , and slate @xcite . the contributions of the current generation of tools have been significant, but support for the task of lexical normalisation has been overlooked. as a result, these tools do not have features that enable in situ token modification or data quality improvements such as decatentation and tokenization whilst performing their main tasks. on the other hand, proprietary writing assistants such as grammarly foot_0 , prowritingaid foot_1 , and ginger foot_2 do contain features required for lexical normalisation, but are prohibitively expensive and not designed for the task of corpora annotation. ## lexiclean -key features this section provides an overview of the key features of lexiclean that enable rapid multi-task token-level annotation that supports both seq2seq and token classification task formats. an overview of the system is presented in figure 1 with a webbased interface in figure 3 . ## system architecture lexiclean is built using the modern full stack web development framework mern 5 (mongodb-express-react-nodejs). all annotations are captured at the token-level as shown in the mongodb (nosql) entity relationship diagram in figure 4 . here, the project model stores information related to a project including references to texts, maps and users. the maps model captures replacements and meta-tag gazetteers, as well as static assets such as a standard english lexicon. the texts model comprises information pertaining to individual texts such as its original value, aggregate tf-idf weight and resulting rank, whether its been annotated, and its constituent tokens. texts reference the tokens model that is composed of the tokens original value, and accepted or suggested annotations (replacement, meta_tags, sug-gested_replacement). lastly, users contains information about users such as their username, password and email. ## case study without comparable systems, we demonstrate the efficacy of lexiclean through the annotation of 5 mern. https://www.mongodb.com/mern-stack user generated content (ugc) from the specialiseddomain of industrial mining (im) @xcite . to date, ugc in industrial domains has received little attention from the nlp community, with state-of-the-art systems relying heavily on hand-craft rules and heuristics for normalisation @xcite . more recently, it has also been highlighted that corpora derived from such domains can pose challenges to state-of-the-art nlp systems @xcite . ## conclusion and future work we have introduced lexiclean, an open-source annotation tool for multi-task lexical normalisation.