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

arXiv: https://arxiv.org/abs/2104.03958 · HTML: https://mlsanity.com/paper/2104.03958/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- Builds on 17 of its 62 references that are in the map.
- First posted on arXiv 8 Apr 2021.

## Builds on (most cited first, 17 of 17)

- ["Why Should I Trust You?": Explaining the Predictions of Any Classifier](https://mlsanity.com/paper/1602.04938/) (2016)
- [A large annotated corpus for learning natural language inference](https://mlsanity.com/paper/1508.05326/) (2015)
- [Convolutional Neural Networks for Sentence Classification](https://mlsanity.com/paper/1408.5882/) (2014)
- [Bag of Tricks for Efficient Text Classification](https://mlsanity.com/paper/1607.01759/) (2016)
- [Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inference](https://mlsanity.com/paper/1902.01007/) (2019)
- [Annotation Artifacts in Natural Language Inference Data](https://mlsanity.com/paper/1803.02324/) (2018)
- [Evaluating Gender Bias in Machine Translation](https://mlsanity.com/paper/1906.00591/) (2019)
- [Explaining Black Box Predictions and Unveiling Data Artifacts through Influence Functions](https://mlsanity.com/paper/2005.06676/) (2020)
- [FIND: Human-in-the-Loop Debugging Deep Text Classifiers](https://mlsanity.com/paper/2010.04987/) (2020)
- [Corpus Wide Argument Mining -- a Working Solution](https://mlsanity.com/paper/1911.10763/) (2019)
- [Neural Generation of Regular Expressions from Natural Language with Minimal Domain Knowledge](https://mlsanity.com/paper/1608.03000/) (2016)
- [Syntactic Search by Example](https://mlsanity.com/paper/2006.03010/) (2020)
- [Automatically Extracting Challenge Sets for Non local Phenomena in Neural Machine Translation](https://mlsanity.com/paper/1909.06814/) (2019)
- [Unsupervised Expressive Rules Provide Explainability and Assist Human Experts Grasping New Domains](https://mlsanity.com/paper/2010.09459/) (2020)
- [Classifying Syntactic Errors in Learner Language](https://mlsanity.com/paper/2010.11032/) (2020)
- [Fine-grained evaluation of German-English Machine Translation based on a Test Suite](https://mlsanity.com/paper/1910.07460/) (2019)
- [Linguistic evaluation of German-English Machine Translation using a Test Suite](https://mlsanity.com/paper/1910.07457/) (2019)

## Built on by (most cited first, 6 of 6)

- [Explainable Patterns for Distinction and Prediction of Moral Judgement on Reddit](https://mlsanity.com/paper/2201.11155/) (2022)
- [Interactive Machine Teaching by Labeling Rules and Instances](https://mlsanity.com/paper/2409.05199/) (2024)
- [POTATO: exPlainable infOrmation exTrAcTion framewOrk](https://mlsanity.com/paper/2201.13230/) (2022)
- [Argumentative Explanations for Pattern-Based Text Classifiers](https://mlsanity.com/paper/2205.10932/) (2022)
- [MuLER: Detailed and Scalable Reference-based Evaluation](https://mlsanity.com/paper/2305.14991/) (2023)
- [RuleChef: Grounding LLM Task Knowledge in Human-Editable Rules](https://mlsanity.com/paper/2607.01293/) (2026)

## Abstract (arXiv)

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).
