liveBook · Manning

Fuzzy regular expression

As explained in Natural Language Processing in Action, Second Edition

A fuzzy regular expression is a regular-expression matching method that permits a bounded number of insertion, deletion, or substitution errors.

A fuzzy regular expression relaxes exact grammar matching. It selects the closest match among possible regular-expression rules while allowing a bounded number of insertion, deletion, or substitution errors. section 1.9

The technique helps grammar-based assistants by:

  • Reducing the brittleness of exact regular-expression matching. section 1.9
  • Supporting question-answering and task-execution bots. section 1.9
  • Avoiding tokenization or feature generation in the described chatbot approach. section 1.9

Assistant systems

Lex, Siri, and Google Now illustrate the question-answering and task-execution systems that can use fuzzy matching and related techniques to handle approximate grammar matches. section 1.9

The approach improves matching robustness but does not remove the labor of expanding and maintaining a broad set of chatbot behaviors. section 1.9

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Defines bounded insertion, deletion, and substitution errors but stops short of explaining an algorithm or implementation.
Examples
Uses Lex, Siri, and Google Now as examples of question-answering and task-execution assistants.
What it assumes
Assumes regular-expression grammar rules and exact matching, while avoiding tokenization and feature-generation requirements.
What you can do after
Evaluate how bounded errors reduce brittleness while recognizing the continuing human work required to expand chatbot behavior.
How it connects
Connects regular expressions with grammar-based chatbots, question answering, task execution, and approximate matching.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.