liveBook · Manning

Formal language

A formal language is a set of strings over an alphabet defined by explicit rules for forming valid expressions and, optionally, interpreting them.

How 2 Manning books explain it

Natural Language Processing in Action, Second Edition

A formal language is a language defined by strict rules specifying how valid statements are composed and interpreted.

How it is used
Uses strict symbol patterns to recognize commands, trigger actions, and support chatbot dialogue.
How deep it goes
Defines grammars, matching, extraction, and finite-state machines, while deferring detailed FSM theory and mathematics.
Examples
Uses lock sequences, chatbot greetings, search matching, grep, and pattern-based chatbot systems as concrete examples.
What you can do after
Apply it via regular expressions to match phrases, extract information, and trigger scripted responses.

Read how Natural Language Processing in Action, Second Edition explains formal language →

Data Analysis with LLMs

A formal language is a language defined by explicit symbols and grammatical rules for expressing structured statements to computational systems.

How it is used
Connects natural-language questions to specialized tools by translating them into tool-specific queries or code.
How deep it goes
Explains query translation, database-structure prompts, and query checking, but does not detail language syntax or internals.
Examples
Uses a product-review table with review IDs, satisfaction flags, and product categories as a structured-data example.
What you can do after
Apply it via a language model to translate a question and database structure into a query, then check the query before execution.

Read how Data Analysis with LLMs explains formal language →

Related concepts

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.