Contents
Natural language processing (NLP) is the branch of artificial intelligence that lets software read, interpret and produce human language: it turns sentences into data a program can act on, and turns data back into sentences. In companies, most of that language arrives as documents. Once invoice OCR has turned a scan into characters, NLP works out what those characters say: which line is the total, which name is the supplier, which date is the due date. This guide covers how NLP works, where it came from, the tasks it handles and the point where it stops.
What is natural language processing?
NLP sits where linguistics meets computer science. IBM describes it as the combination of computational linguistics, the rule based modeling of human language, with statistical modeling, machine learning and deep learning. The goal is practical: a system that can answer a question, sort an email, summarize a report or find the renewal date in a contract without a person reading it first.
The question is older than the computers that could answer it. Alan Turing opened his 1950 paper Computing Machinery and Intelligence, published in the journal Mind, with three words that still frame the field:
"Can machines think?" (Alan Turing, Computing Machinery and Intelligence, 1950)
Most people use NLP every day without naming it: voice assistants such as Siri or Alexa, the spam filter of a mailbox, suggested replies, machine translation and a search box that understands a vague query. Large language models such as GPT or Claude are the most visible form of NLP today. Andrej Karpathy, a founding member of OpenAI, summed up what changed with them in a thread on language models:
If previous neural nets are special-purpose computers designed for a specific task, GPT is a general-purpose computer, reconfigurable at run-time to run natural language programs. Programs are given in prompts (a kind of inception). GPT runs the program by completing the document
Andrej Karpathy (@karpathy), November 18, 2022
NLP, NLU and NLG: what is the difference?
Three acronyms come up together and are often mixed up. NLP is the whole field; the two others name its two directions, reading and writing. The table below gives one example of each, taken from the same everyday task of answering a customer email.
| Term | What it covers | Example |
|---|---|---|
| NLP | The whole field: reading, analyzing and producing language | A helpdesk tool that handles incoming emails |
| NLU | Understanding: intent, entities, meaning | Seeing that "my card was charged twice" asks for a refund |
| NLG | Generation: writing text from data or a prompt | Drafting the reply that confirms the refund |

Computational linguistics is the research discipline behind all three: it studies language with formal and statistical models, while NLP is the engineering that turns those models into working software.
How does NLP work?
Whatever the model, a text goes through the same broad stages before a program can use it. Older systems ran each stage as a separate tool; modern neural models learn several of them at once, but the stages remain the clearest way to see what happens to a sentence.

Segmentation and tokenization
The text is split into sentences, then into tokens: words, parts of words, numbers and punctuation. "Invoice no. 2026-118" has to stay one reference rather than three fragments, which is harder than it looks on business documents full of abbreviations and codes.
Normalization
Variation is reduced so that different forms count as the same word. Stemming cuts endings ("processing" becomes "process"), lemmatization returns the dictionary form ("was" becomes "be"), and very common words such as "the" or "of" can be set aside when they carry no meaning for the task.
Representation
Computers calculate with numbers, so words become vectors. Early methods counted words (bag of words, TF-IDF). Word embeddings such as Word2vec, developed by Tomáš Mikolov after his 2010 work on neural language models, placed words with similar meanings close together. Transformer models give each word a vector that depends on the whole sentence, so "bank" in a statement and the bank of a river no longer look alike.
Analysis and the task itself
The system tags each word with its grammatical role, maps how words depend on each other, and finds names of people, companies, places, dates and amounts with named entity recognition. The last step is the task the project was built for: a sentiment score, a category, an answer, a summary or a filled form.
How did NLP evolve from rules to language models?
NLP went through three eras, and each one still runs somewhere in production software. Knowing which one a tool relies on tells you a lot about the mistakes it will make.
- Rules (1950s to the late 1980s). In 1954 the Georgetown experiment translated more than sixty Russian sentences into English automatically. Progress was slower than promised, and after the ALPAC report of 1966 found that ten years of research had not met expectations, funding for machine translation fell sharply. ELIZA, written by Joseph Weizenbaum between 1964 and 1966, imitated a therapist with a handful of patterns.
- Statistics (late 1980s and 1990s). Programs started to learn from corpora instead of hand written rules. An IBM team described a probabilistic approach to machine translation in a 1990 paper, and statistical NLP gave us spellcheckers and T9 predictive text.
- Neural networks (2000s onward). In 2003 a neural network beat the best word n-gram model for the first time; since 2015 neural methods have largely replaced statistical ones, and the transformer described in Attention Is All You Need (2017) is the basis of today's large language models.
The jump to language models looks sudden from the outside, yet the idea is old, as Karpathy noted in the post that opens the same thread:
An interesting historical note is that neural language models have actually been around for a very long time but noone really cared anywhere near today's extent. LMs were thought of as specific applications, not as mainline research unlocking new general AI paths and capabilities
Andrej Karpathy (@karpathy), November 18, 2022
Rules have not disappeared. They remain the cheapest way to read a format that never changes, such as an IBAN or a tax identification number, and many document tools pair a language model with rules that check its output.
What are the main NLP tasks?
An NLP project is never NLP in general: it is one or several precise tasks, each chosen to answer a business question. These are the tasks you will meet most often, with the place where each one earns its keep.
- Classification: routing an email, sorting documents by type, flagging spam.
- Named entity recognition: pulling names, dates, amounts and identifiers out of contracts, claims and invoices.
- Sentiment analysis: scoring reviews or survey answers as positive, negative or neutral to see what customers complain about.
- Summarization: condensing a long report, a call transcript or a medical record.
- Translation: localizing a product, reading foreign supplier documents.
- Question answering: answering customers or employees from a knowledge base.
Healthcare uses NLP to read notes in electronic health records that would otherwise stay locked in free text. Finance and insurance use it to read the paperwork that comes with a loan, a claim or a new supplier, which is where it meets OCR.
What does NLP do after OCR extraction?
OCR and NLP are often confused because they work side by side. OCR converts the pixels of a scan or a photo into characters; it has no idea what those characters mean. NLP takes that raw text and gives it structure. On a scanned invoice, the work after OCR follows four steps.
From a scan to usable data
- Step 1OCR reads
- Pixels become characters
- Text keeps its position
- Step 2NLP classifies
- Invoice, payslip or contract
- Step 3NLP extracts
- Supplier, date, total, tax
- Labels linked to values
- ResultStructured data
- Fields ready for the ERP
Classification decides which model to apply, because an invoice and a payslip do not carry the same fields; that is the job of automatic document classification. Extraction then links each label to its value ("Total due" to the amount on the same line), normalizes dates and currencies, and checks simple consistency, such as subtotal plus sales tax equal to the total. Accuracy depends first on the OCR: a misread digit is a wrong amount, however good the language model.
What NLP does not see is the file. It reads the text it is handed, and that text can differ from what the page shows. On one of Koncile's own test invoices edited by an AI assistant, the screen shows 50,900.00 while the text stored in the PDF says 50,400.00. A language model will extract either figure without blinking; only a check on the file itself, the kind used against invoice fraud, shows that the two disagree.
| On one invoice | OCR | NLP | File check |
|---|---|---|---|
| Reads the characters | Yes | No | No |
| Knows which amount is the total | No | Yes | No |
| Sees an edited figure | No | No | Yes |
What are the limits of NLP?
NLP has made huge progress, yet several problems remain open. They matter as soon as the output feeds a decision rather than a suggestion, for instance a payment, a loan or a claim.

- Ambiguity: the same word or sentence can mean different things, and context does not always settle it.
- Irony and tone: models still read many sarcastic sentences literally.
- Coreference: linking "it" or "the company" to the right entity across a long document.
- New vocabulary: product names, slang and acronyms missing from the training data.
- Bias: a model trained on biased text repeats that bias in its answers.
- Invented answers: large language models can produce fluent text that is false, which is why extracted values are checked against the source.
Frequently asked questions
What does NLP stand for?
NLP stands for natural language processing, the field of artificial intelligence that lets computers read, understand and produce human language. In psychology the same three letters also mean neuro-linguistic programming, an unrelated coaching method.
Is natural language processing hard?
Using it has never been easier: libraries such as spaCy or Hugging Face Transformers, and hosted language models, give good results in a few lines of code. Building a reliable system is harder, because ambiguity, domain vocabulary and error checking take most of the effort.
What is sentiment analysis in NLP?
Sentiment analysis is the NLP task that labels a text as positive, negative or neutral, sometimes with a score or an emotion. Companies run it on reviews, support tickets and survey answers to see what customers like or complain about at scale.
What does NLP help AI achieve?
NLP is what lets an AI system take instructions in plain language and answer in plain language. Without it, chatbots, voice assistants, translation and document extraction would all need people to rewrite language into a fixed format first.
What does NLP do after OCR extraction?
OCR turns an image into raw text. NLP then classifies the document, finds the fields that matter, links each label to its value and normalizes dates and amounts, so the text becomes structured data. It does not check whether the file was edited.





