GrASP: A Library for Extracting and Exploring Human-Interpretable Textual Patterns

14467

Authors

nan

Abstract

AbstractData exploration is an important step of every data science and machine learning project, including those involving textual data. We provide a novel language tool, in the form of a publicly available Python library for extracting patterns from textual data. The library integrates a first public implementation of the existing GrASP algorithm. It allows users to extract patterns using a number of general-purpose built-in linguistic attributes (such as hypernyms, part-of-speech tags, and syntactic dependency tags), as envisaged for the original algorithm, as well as domain-specific custom attributes which can be incorporated into the library by implementing two functions. The library is equipped with a web-based interface empowering human users to conveniently explore data via the extracted patterns, using complementary pattern-centric and example-centric views: the former includes a reading in natural language and statistics of each extracted pattern; the latter shows applications of each extracted pattern to training examples. We demonstrate the usefulness of the library in classification (spam detection and argument mining), model analysis (machine translation), and artifact discovery in datasets (SNLI and 20Newsgroups).

Keywords

nan

Full Content

Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022), pages 6093–6103 Marseille, 20-25 June 2022 © European Language Resources Association (ELRA), licensed under CC-BY-NC-4.0 6093 GrASP: A Library for Extracting and Exploring Human-Interpretable Textual Patterns Piyawat Lertvittayakumjorn1, Leshem Choshen2, Eyal Shnarch2, Francesca Toni1 1Department of Computing, Imperial College London, United Kingdom 2IBM Research pl1515@imperial.ac.uk, {leshem.choshen, eyals}@il.ibm.com, ft@imperial.ac.uk Abstract Data exploration is an important step of every data science and machine learning project, including those involving textual data. We provide a novel language tool, in the form of a publicly available Python library for extracting patterns from textual data. The library integrates a first public implementation of the existing GrASP algorithm. It allows users to extract patterns using a number of general-purpose built-in linguistic attributes (such as hypernyms, part-of-speech tags, and syntactic dependency tags), as envisaged for the original algorithm, as well as domain-specific custom attributes which can be incorporated into the library by implementing two functions. The library is equipped with a web-based interface empowering human users to conveniently explore data via the extracted patterns, using complementary pattern-centric and example-centric views: the former includes a reading in natural language and statistics of each extracted pattern; the latter shows applications of each extracted pattern to training examples. We demonstrate the usefulness of the library in classification (spam detection and argument mining), model analysis (machine translation), and artifact discovery in datasets (SNLI and 20Newsgroups). Keywords: pattern extraction, textual data exploration, resource tool, grasp, python library, model debugging, model analysis, data analysis 1. Introduction Pattern-based analysis is a promising approach for ex- ploring textual data in many tasks, such as authorship classification (Houvardas and Stamatatos, 2006), rela- tion extraction (Hearst, 1992; Peng et al., 2014) and argument mining (Madnani et al., 2012). Patterns un- cover prominent characteristics of the data which lead to interesting insights, helping humans proceed to the next steps (e.g., data pre-processing, setting model hyper- parameters). In this paper, we implement and publicly release a Python library named GrASP after a super- vised algorithm which learns expressive patterns (in the form of sequences of conjunctions of attributes) char- acterizing linguistic phenomena (Shnarch et al., 2017). Apart from the usefulness of the web resource, this is the first public implementation of GrASP. To illustrate the richness of GrASP patterns, examples 1–3 in Table 1 are all SMS spam messages from the dataset by Almeida et al. (2011). While there is little word overlap between them, their commonality is apparent, even if hard to name. The GrASP algorithm can reveal an underlying structure which generalizes these three realizations of spams within a single pattern: a positive-sentiment word (represented by SENTIMENT:pos), closely followed by a determiner (represented by POS:det, where POS stands for ‘part of speech’), and then by a proper noun (represented by POS:propn). The input for the algorithm amounts to two sets of texts: in one (the positive set) the target phenomenon appears in all examples (e.g., all are spam messages), and in the other (the negative set) …

Content truncated to 500 words

Labeled Text

AbstractData exploration is an important step of every data science and machine learning project, including those involving textual data. We provide a novel language tool, in the form of a publicly available Python library for extracting patterns from textual data. The library integrates a first public implementation of the existing GrASP algorithm. It allows users to extract patterns using a number of general-purpose built-in linguistic attributes (such as hypernyms, part-of-speech tags, and syntactic dependency tags), as envisaged for the original algorithm, as well as domain-specific custom attributes which can be incorporated into the library by implementing two functions. The library is equipped with a web-based interface empowering human users to conveniently explore data via the extracted patterns, using complementary pattern-centric and example-centric views: the former includes a reading in natural language and statistics of each extracted pattern; the latter shows applications of each extracted pattern to training examples. We demonstrate the usefulness of the library in classification (spam detection and argument mining), model analysis (machine translation), and artifact discovery in datasets (SNLI and 20Newsgroups).

Publication Details

Paper ID:
14467
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan