About
Mission
formalNLP treats natural language processing as a mathematical subject. Tutorials on how to call a language model are everywhere; careful treatments of the mathematics underneath — why vocabulary follows a power law, why smoothing works, why attention is a kernel smoother, why a classifier's probabilities can be trusted or not — are rare. This site fills that gap. Every topic receives the three-pillar treatment shared across the formal series: rigorous mathematical exposition, interactive visual intuition, and working code you can run immediately.
The curriculum runs from the statistics of text and language modeling, through word and contextual representations, attention and transformers, and decoding, to the applied tasks — classification and sentiment, information extraction and knowledge graphs, text mining — and the evaluation of all of it. Where a celebrated method's guarantees are heuristic rather than proven, we say so plainly.
The formal series
formalNLP is the fifth site in a family of mathematics-heavy explainers. Its prerequisites often live on its sibling sites: formalML (kernels, information theory, variational inference), formalStatistics (estimation, hidden Markov models, the bootstrap), formalCalculus (linear algebra, Fourier analysis, optimization), and formalRAG (embedding geometry, vector search, and retrieval). Topics link directly to the foundations they rely on.
The finance thread
A running case study threads the site: language as it appears in corporate disclosure — earnings calls, 10-K filings, and the specialized sentiment vocabulary of finance. Case studies run on a shared synthetic corpus and short public SEC excerpts, and they culminate in a capstone that carries one corpus from tokenization to a knowledge graph.
Author
Jonathan Rocha is a data scientist and researcher specializing in financial NLP and the mathematical foundations of machine learning. He holds an MS in Data Science from SMU, an MA in English from Texas A&M University, and a BA in History from Texas A&M. He is the author of Applied NLP for Finance.
DataSalt
formalnlp.com is an independent educational project by the founder of DataSalt LLC.