liveBook · Manning

String match

Also called string matching

String matching is the computational task of locating or comparing character sequences according to a specified exact or approximate matching criterion.

How 2 Manning books explain it

Algorithms Every Programmer Should Know

String matching is the computational task of locating exact or approximate occurrences of one character sequence within another.

How it is used
Locates a pattern within text and supports plagiarism screening across large document collections.
How deep it goes
Works from direct character comparisons through rolling hashes and collision checks, but does not detail semantic matching internals.
Examples
Compares COOL against ALICEANDJOEBAKEDCOOKIES and applies fingerprinting to plagiarism checks across document collections.
What you can do after
Apply Rabin–Karp to find pattern positions by hashing text windows and verifying character matches.

Read how Algorithms Every Programmer Should Know explains string match →

Natural Language Processing in Action, Second Edition

String matching is the process of finding exact or approximate occurrences or correspondences between character sequences.

How it is used
Uses character-sequence matching to power lightweight NLP pipelines, chatbots, question-answering systems, and task-execution assistants.
How deep it goes
Connects regular expressions to efficiently parsable regular languages, then demonstrates brute-force edit-distance retrieval without tokenization.
Examples
Shows ChatterBot statement retrieval, Will regular-expression rules, and Salvius conversational behavior.
What you can do after
Apply string matching to retrieve responses by brute-force search or route assistant inputs through regular-expression rules.

Read how Natural Language Processing in Action, Second Edition explains string match →

Also covered in

What to know first

Related concepts

Questions about string match

What is string match?

String matching is the computational task of locating or comparing character sequences according to a specified exact or approximate matching criterion.

Which Manning books explain string match?

Algorithms Every Programmer Should Know and Natural Language Processing in Action, Second Edition.

What should I know before learning string match?

Manning books that teach string match usually introduce function, language model and Python first.

What is the difference between string match and exact-match accuracy?

String matching is the computational task of locating or comparing character sequences according to a specified exact or approximate matching criterion. Exact-match accuracy is the proportion of predictions or outputs that equal their reference answers under specified comparison rules.

What kinds of string match are there?

Kinds of string match include Knuth-Morris-Pratt algorithm, Rabin-Karp algorithm and Boyer-Moore-Horspool algorithm.

What is string match also called?

String match is also called string matching.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.