Checking a value against a pattern

Anyone who has ever used word processing programs has had to face the problem of searching for a text string within the period. Perhaps without knowing it, we came across the pattern matching problem. Pattern matching is a procedure in which you check whether a token sequence has a certain pattern, that is, a combination of characters that respects a certain pattern.

A lexical token, or simply token, is a string with an assigned and thus identified meaning. It is structured as a pair consisting of a token name and an optional token value. The token name is a category of lexical unit.

As for the interpretation of the inputs by a chatbot, pattern matching can be useful for recognizing certain message sets. ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.