Language looks simple until software has to touch it.
"The bank approved my loan."
"I sat near the river bank."Same word. Different meaning.
That is the annoying part of language: words carry context, order, tone, and relationships. A system cannot treat text as a flat list of words and expect to understand much.
The bank approved my loan.
I sat near the river bank.
The model has to use nearby words to decide which meaning of bank is active.
This sits before the embedding/Transformer story: counting words to embeddings, then contextual embeddings to Transformers.
NLP
NLP means Natural Language Processing.
Basically: making software work with human language.
That includes things like:
classification
translation
summarization
question answering
chatbots
semantic search
speech-to-text
information extraction
sentiment analysisThe pattern is usually:
raw text -> useful structure or useful textExample:
Input:
"I love this product."
Output:
sentiment = positiveNLP is the broad field. Two useful sub-ideas inside it:
NLU = reading / understanding
NLG = writing / generatingBook me a flight to Paris next Friday.
intent, destination, date, sentiment, entities
a natural-language response or summary
NLP is the full field. NLU is the reading side. NLG is the writing side.
NLU
NLU means Natural Language Understanding.
The job is to turn a messy sentence into meaning the system can use.
"Book me a flight to Paris next Friday."Could become:
intent: book_flight
destination: Paris
date: next FridayThat is the useful part. The system is not only seeing words. It is pulling out a goal and the details attached to it.
NLU shows up in:
- intent detection
- named entity recognition
- sentiment analysis
- topic classification
- search query understanding
- support ticket routing
Most product workflows that start with natural language need some version of this.
NLG
NLG means Natural Language Generation.
This is the output side.
Examples:
- writing an answer
- summarizing a document
- generating an email
- producing a chatbot reply
- translating text
- explaining data in plain language
Translation uses both sides. The system has to understand the source text, then generate the target text.
Small map:
NLP = full field
NLU = understand text
NLG = generate textModern LLM apps usually combine all three: understand the request, retrieve or process information, then generate a useful answer.
Tokenization
Tokenization is the first boring thing that turns out not to be boring.
It breaks text into smaller units called tokens.
Tokens can be:
words
subwords
characters
punctuationExample:
"Apple opened a new office in Paris."can become:
["Apple", "opened", "a", "new", "office", "in", "Paris", "."]Modern models often use subwords:
"unbelievable"
-> ["un", "believ", "able"]The usual flow:
text
-> tokens
-> token IDs
-> embeddings
-> modelTokenization affects cost, context length, search behavior, and weird edge cases with unfamiliar words.
Apple opened a new office in Paris.
After tokenization, each token can be mapped to an ID and then to an embedding vector.
Named entity recognition
Named Entity Recognition is usually shortened to NER.
It finds named things in text:
people
companies
locations
dates
money amounts
organizations
productsExample:
"Apple opened a new office in Paris on Monday."NER output:
Apple -> Organization
Paris -> Location
Monday -> DateThis is where text starts becoming structured.
"Meeting with Sarah in London next Friday."can become:
person: Sarah
location: London
date: next FridayOnce text becomes structured, applications can route it, search it, validate it, and store it more cleanly.
Apple
Paris
Monday
NER turns unstructured text into fields an application can store, filter, or route.
Sentiment analysis
Sentiment analysis tries to detect tone or opinion.
Basic labels:
positive
negative
neutralExamples:
"I love this app."
-> positive
"This app keeps crashing."
-> negative
"The app was updated yesterday."
-> neutralIt is used in reviews, surveys, support tickets, feedback analysis, and social monitoring.
The annoying part is sarcasm and context.
"Great, the app crashed again."The word great looks positive. The sentence is not.
I love this app. It is fast and easy to use.
This app keeps crashing after the update.
The app was updated yesterday.
The simple version predicts positive, negative, or neutral. Real systems often need more nuance.
The map before embeddings
All of this points at the same problem:
How does text become something software can process?Older NLP systems mostly counted words.
Modern systems try to represent meaning.
The rough path:
raw text
-> tokens
-> numbers
-> meaning-like representations
-> useful outputThe compact version:
NLP = the whole field
NLU = interpret language
NLG = generate language
tokenization = split text into model-readable units
NER = extract named things
sentiment = estimate toneNext problem: before embeddings, how did systems represent text?
That is where one-hot vectors, Bag of Words, and TF-IDF come in.