Natural Language Processing
Data Science, Human Language Technology, and Natural Language Processing
A shared foundation: prediction from data
Data science (DS), human language technology (HLT), and natural language processing (NLP) use data and statistical models to make inferences. A common goal is to estimate what is likely to happen or what an observation is likely to represent. Machine learning—and, in many current applications, deep learning—provides methods for making these predictions.
A probability describes how likely an event is. For example, the probability of a fair coin landing heads is 0.5. A conditional probability estimates the chance of an event given some information. In general, it can be written as P(A∣B), meaning “the probability of event A given information or condition B.”
The kinds of predictions differ by field:
Data science: A system in an autonomous vehicle might estimate the probability that an object in front of the car is a person, given sensor readings, historical data, and metadata.
Human language technology: A text-to-speech system might estimate whether a speech segment is suitable for synthesis, given its spectral properties, duration, focus, part of speech, and other information.
Natural language processing: A system might estimate whether a post contains hate speech, given its text, language, metadata, posting time and location, and information about its sharing or retweeting.
The underlying pattern is the same: use known information to predict an unknown outcome. A familiar everyday analogy is forecasting rain. The estimate may change depending on what is known—for example, the prediction made on Monday may differ from one made on Thursday because the latter is closer to the forecasted day.
Statistical modeling and two modeling cultures
A statistical model is a mathematical representation built from data to help explain or predict something. Models are useful simplifications, not perfect copies of reality. The guiding idea is that all models are imperfect, but some are useful for particular purposes.
Two broad approaches to modeling emphasize different goals.
Data modeling
In data modeling, the model is treated as a representation of an underlying data-generating process: the processes or relationships that produced the observations. The aim is often to understand what the model says about those processes.
For example, a researcher studying language use might build a regression model to examine whether a speaker’s language background, age, or other characteristics are associated with particular linguistic behaviors. The model’s parameters matter because they can be interpreted as evidence about those relationships.
This approach commonly favors simpler, interpretable models, especially when the purpose is causal research or explanation. Researchers care about questions such as:
Which variables appear related to the outcome?
How strong are those relationships?
Does one predictor tell more about the outcome than another?
What do the model’s parameters suggest about the data-generating process?
Methods encountered in introductory statistics—such as t-tests, analyses of variance, linear regression, and logistic regression—are often used in this explanatory tradition.
Algorithmic modeling
In algorithmic modeling, the central goal is prediction. The model is evaluated by how well it predicts outcomes for new or unseen data, not necessarily by whether its internal structure provides an interpretable account of reality.
This approach does not require the model to reflect an underlying process. It may use a complex black-box model, whose internal operations are difficult to interpret, if that model predicts well. Algorithmic modeling often relies on large amounts of training data and substantial computational power.
In this setting, more data are not automatically helpful: some variables may improve prediction, while others may make it worse. A particularly difficult situation arises when there are many more variables than observations. For example, a dataset might contain a very large number of measured features but only a small number of cases. Models can struggle to learn useful patterns from this imbalance.
Statistical learning as a bridge
Statistical learning provides a bridge between traditional explanatory statistics and prediction-focused machine learning. It develops statistical methods with a strong emphasis on predictive performance while retaining mathematical structure that can help users understand how models work.
Machine learning: learning a program from examples
In traditional programming, a person supplies both the inputs and the instructions. The program applies those instructions to produce an output.
For example, a program could check whether an integer is divisible by 5 or 7 and produce a corresponding result. The programmer explicitly writes the rules.
In machine learning, examples of inputs and their known outcomes are supplied to a model. The learning process uses these examples to produce a model that behaves like a program. Instead of manually writing every decision rule, the practitioner trains the model to infer patterns from data.
Binary classification: chihuahua or muffin?
Binary classification is the task of assigning an example to one of two categories. Possible applications include determining:
Whether an image shows a dog or a muffin.
Whether it will rain or not.
Whether a person is likely to click a link or not.
In the dog-or-muffin example, the model is trained using labeled data: images paired with the correct labels. After training, it receives an unseen image and predicts a category, sometimes along with a confidence estimate. For example, the model might estimate a 95% chance that an image is a dog.
The prediction is then compared with the known correct label. A prediction of “dog” at 55% confidence on an image that is actually a muffin is an error, though the low confidence indicates the model was uncertain. Repeating this process across many labeled examples helps measure how well the model performs.
This comparison is best understood as evaluation using labeled examples. In standard machine-learning terminology, reinforcement learning is a distinct approach in which an agent learns through rewards or penalties from actions; merely checking predictions against known labels is not, by itself, reinforcement learning.
For prediction-focused modeling, the most important question is whether the classifier performs well on new examples. Its accuracy may matter more than whether a person can explain exactly which visual features—such as ears, brightness, or shape—it used.
Regression, model parameters, and prediction
A simple linear regression model represents an outcome y as a weighted combination of known variables x1,x2,…,xp:
Here:
y is the outcome the model aims to predict.
x1,x2,…,xp are predictors, or pieces of information already available.
β0 is the intercept.
β1,β2,…,βp are parameters that determine how strongly the predictors contribute to the prediction.
For a simple example, a model might use height to predict weight, or weight to predict height. Observed cases can be plotted as points, and the model can fit a line to them. The line of best fit is often chosen to minimize the total squared distance between the observed outcomes and the model’s predictions. This quantity is called the residual sum of squares (RSS).
Ridge regression and regularization
When a model has many predictors, some may be unhelpful, and the fitted coefficients may become excessively large. Ridge regression addresses this by adding a penalty to the RSS objective:
The parameter λ controls the strength of the penalty. Larger values penalize large coefficients more strongly, which can help reduce overfitting. This technique is an example of regularization: constraining a model so it does not become too closely tailored to the training data.
The shift from ordinary least-squares regression to ridge regression illustrates how a familiar statistical model can be adapted for machine-learning purposes. More complex models, including neural networks, build on the same broad ingredients:
Predictors or inputs, often called x values.
An outcome to predict, often called y.
Weights or parameters that connect inputs to predictions.
A measure of prediction error that guides model fitting.
Generalization and the bias–variance tradeoff
A model can fail in two opposing ways:
It may make predictions that are too crude or nearly random, failing to capture useful patterns.
It may fit the training examples so closely that it performs poorly on new examples.
The second problem is overfitting. A model may appear to understand every training image, for example, yet be unable to classify a new image it has never seen.
The aim is to find a balance: the model should learn patterns that are informative without memorizing the training data. This is related to the bias–variance tradeoff. In broad terms, a model with too much bias may be too simple to capture relevant patterns, while a model with too much variance may be overly sensitive to the particular training examples. Good predictive performance requires a useful balance and the ability to generalize to new data.
Modern machine learning and learning it effectively
Deep learning can achieve strong results, but it is not automatically effective in every situation. Many systems require large quantities of labeled data. That creates practical questions:
Who labels the data?
What instructions do they receive?
How consistent and accurate are their labels?
How can the quality of the annotation be checked?
Linguists can contribute significantly because they have experience eliciting, analyzing, and evaluating language data. Their expertise can help create high-quality annotations and identify systematic problems in model outputs.
A useful way to approach even complex machine-learning models is to look for their common structure: inputs, outcomes to predict, parameters that connect them, and some way of measuring error. Building a foundation in statistics helps students reason about these components rather than treating a model as a mysterious tool.
Useful learning practices include:
Develop statistical intuition and understand basic inferential statistics.
Conduct analyses independently rather than copying code without understanding it.
Learn statistical assumptions, normality testing, and model assessment.
Understand what a model’s results mean and what they do not establish.
Use introductory statistical-learning materials before moving to more advanced methods.
Natural language processing
Natural language processing (NLP) uses computational methods to represent, analyze, and work with human language. A language-processing system may apply several stages to text, moving from relatively basic units such as sentences and tokens to more complex structures such as entities and their relationships.
The stages below are examples of common NLP tasks. In modern systems, they may be combined, performed jointly, or implemented by deep-learning models rather than used as a strict sequence.
Sentence segmentation
Sentence segmentation identifies where sentences begin and end. A simple rule might treat every period as a sentence boundary, but this fails for abbreviations such as “A.D.” or “U.S.A.,” where a period does not end a sentence.
A more robust system must use context to estimate whether a period marks the end of a sentence. Sentence-boundary detection is therefore a prediction task: a model may make correct or incorrect decisions based on the available text.
Tokenization
Tokenization divides text into units called tokens. Tokens often correspond to words, but they do not always match a reader’s intuitive idea of a word boundary.
For example, “Ukraine’s” may be treated as one word in ordinary reading, but a tokenizer might split it into “Ukraine” and the possessive marker “‘s.” The appropriate representation depends on the task and the conventions of the system.
Part-of-speech tagging
Part-of-speech tagging assigns grammatical categories—such as noun, verb, or adjective—to tokens. This is also a prediction task: a model uses the word and its context to estimate the most likely grammatical label.
Even highly accurate systems make errors. A reported accuracy such as 98% should be understood as strong performance, not perfect performance.
Syntactic parsing
Syntactic parsing analyzes how words and phrases are organized into grammatical structures. It aims to represent relationships among parts of a sentence, rather than merely labeling individual tokens. These structural relationships can support later tasks that need to determine who did what, or how one phrase relates to another.
Entity detection, named entity recognition, and coreference
Named entity recognition (NER) identifies references to entities, such as people, places, and organizations. A related task, coreference resolution, determines when multiple expressions refer to the same entity.
For instance, in a passage that mentions “Moscow” and later uses “it,” a system may need to determine whether the pronoun refers to Moscow. A computational representation may also connect other mentions and concepts in the passage. These tasks require modeling relationships across parts of a text, not just labeling isolated words.
Why language remains difficult for NLP
NLP is not a solved problem. Language depends on context, convention, and knowledge about the world. A system can misinterpret a request because it handles the literal words but misses the user’s intention—for example, translating a Spanish song title instead of recognizing it as the title of a song to play.
A short news-style passage illustrates several challenges: “The police arrested Mayor John Smith yesterday. He was suspected of stealing garden gnomes, the latest breach in a crime wave rocking the sleepy town of Springfield.”
Coreference and entity relationships
A system must determine that “he” refers to Mayor John Smith. It may also need to represent how the police, the suspected crime, and Springfield relate to one another. These connections are not captured by processing each word independently.
Ontological representation
An ontology represents entities, categories, and relationships. A system must decide how to represent “Mayor John Smith.” It might encode a person named John Smith who holds the role of mayor, or treat “Mayor John Smith” as a single named entity. The best representation depends on what the system needs to do and which information is most important for the task.
Event relations and real-world knowledge
The relationship between “suspected” and “arrested” relies partly on knowledge of events and their typical ordering. People understand that suspicion is often associated with an investigation and may precede an arrest, but that sequence is not guaranteed by the words alone. A system must either learn useful patterns from data or be given relevant knowledge and rules.
Subjectivity
Being “suspected” of a crime is not the same as having committed it. The statement reports a judgment or allegation, not proof of guilt. Systems must distinguish claims, beliefs, and other subjective or uncertain information from established facts.
Figurative language and metonymy
The phrase “a crime wave rocking the town” is metaphorical. A crime wave does not literally rock a town. Likewise, a “sleepy town” usually means a quiet or peaceful town, not a town that needs sleep. Systems must interpret these expressions according to figurative meaning and context.
Metonymy also creates challenges: an expression may refer to something associated with its literal meaning rather than to the literal thing itself. Representing such language requires knowledge of how expressions are used, not just their dictionary meanings.
Linguists’ contributions to language technology
In many production settings, research scientists and engineers build the machine-learning models and implement them in software. Linguists often contribute in complementary ways:
Provide domain knowledge: Explain how linguistic structures and patterns work.
Diagnose errors: Identify systematic weaknesses, such as poor handling of possessives or particular constructions.
Improve annotation: Help define labeling guidelines and produce or review training data.
Guide representation: Clarify what linguistic information a system should encode and how it should represent it.
The division of work varies by team. Linguists may not be expected to build every model from scratch, but technical understanding helps them collaborate effectively with engineers and make their linguistic expertise useful in model development.
Compositional semantics and ontologies
Knowledge of compositional semantics can be relevant to natural-language understanding. Compositional approaches examine how meanings are built from parts and how expressions relate to one another. This connects to ontologies and structured representations.
For example, a digital assistant may need to interpret “I love my mom. Why don’t we call her now?” It must connect “her” with “my mom” and represent enough information to act on the request. Ontologies and related representations can help systems capture entities, references, and relationships.
Speech science and human language technology
Speech-science expertise is relevant to technologies such as:
Text-to-speech synthesis (TTS): Systems that produce speech from text.
Automatic speech recognition (ASR): Systems that convert speech into text or another representation.
These areas involve technical questions about spoken language, including the properties and timing of speech segments. The number of opportunities in speech-focused and text-focused work varies, so it cannot be assumed that one area consistently has more jobs than another.
Preparing for work in NLP and data science
Progress in these fields usually requires sustained independent learning. Formal classes can establish foundations, but students also benefit from pursuing projects that connect technical learning to topics they care about.
Learn through projects
A project can make programming more meaningful than exercises alone. A student might investigate a linguistic property of a language and build or improve a tool that models it. The project gives the student a concrete problem to solve and a way to demonstrate what they can do.
Many NLP tools are open source. A common contribution process is:
Fork a project by making a copy of its code repository.
Examine the code and identify a change or improvement.
Implement and test the change.
Submit a pull request asking the original maintainers to review the contribution.
This process provides practical experience and creates visible evidence of technical work.
Create a portfolio and keep records
A portfolio can include a personal website linked to code repositories. Each project should explain:
The problem it addresses.
What the project does.
What work the student contributed.
Where the code and results can be found.
Keeping records is important because claims such as “I know Python” or “I know statistics” are more convincing when supported by finished projects, documented contributions, or other concrete artifacts. Academic publications and research can also be included, although employers may not have time to read long papers in detail.
Build practical skills
Other useful steps include:
Complete side projects that identify and solve real problems.
Look for paid internships or volunteer opportunities.
Learn new tools and develop practical experience with data.
Understand the models being used rather than running them without knowing what their outputs mean.
Automate repetitive work. For example, long analysis scripts can be organized into reusable functions, and unit tests can check that those functions behave as intended.
Document the impact and results of completed work.
Knowing how to code is not always a strict requirement for a linguistics role, but it is usually beneficial. Technology work involves collaboration with engineers, and being able to engage with code and technical ideas makes that collaboration easier. Python is commonly useful because it is a relatively readable, high-level scripting language, but it is not the only language used in NLP; prior experience with another language, such as Java, can also provide a foundation.
Annotation work and practical experience
Linguistic annotation projects may be available through vendors that recruit annotators for technology companies. Such work can provide experience with language data, annotation guidelines, and quality control. Annotation quality matters because machine-learning systems depend on the labels used to train and evaluate them.
Education and the job market
A graduate degree is not always required for NLP or computational-linguistics work. However, a degree alone does not guarantee a job: applicants need a relevant skill set, and employers respond to market conditions. The field may have many people with linguistic knowledge relative to the number of available positions, so students benefit from combining linguistic expertise with technical skills and demonstrable project experience.
Linguists may become increasingly valuable as NLP systems move into more difficult language problems. Their understanding of how people use language can help teams address situations that are not handled well by simpler patterns. This is a reasoned expectation, not a certainty about future hiring.
Learning resources and next steps
Introductory statistical-learning materials can help students progress from basic statistics toward machine learning. A reader-friendly introduction to statistical learning is a useful starting point; more advanced statistical-learning texts provide greater mathematical and technical depth. Bayesian data analysis is another area for students who are ready to move beyond introductory statistical modeling.
For NLP, open-source toolkits such as the Natural Language Toolkit (NLTK) provide code and learning materials. Textbooks and other introductory resources can also help, though some assume technical or mathematical background. Encountering equations is not a reason to abandon a resource: students can work through the ideas gradually and focus on understanding what the models are doing.
The strongest preparation combines statistical understanding, practical work with data, familiarity with language technology, and a record of completed projects that demonstrates how those skills have been applied.

Ask anything
We've read this whole study set, so questions about it get the best answers.