CAS logoCASCenter for Advanced Studies · AI Engineering Program

01 CAS · AI ENGINEERING · DEEP LEARNING · NATURAL LANGUAGE PROCESSING

INTRODUCTION TO NATURAL LANGUAGE
PROCESSING

How do we convert human language into something a machine can understand, reason about, and generate?

DEFINITION

Natural Language Processing is a branch of Artificial Intelligence concerned with enabling computers to process, analyze, understand and generate human language.

  • AUNDERSTAND
  • BCLASSIFY
  • CEXTRACT
  • DGENERATE

HUMAN LANGUAGE · click a sentence

Hovering a sentence previews how an NLP system might read it — this foreshadows the whole lecture.

INSIDE A MACHINE · preview

01.1 WHY NLP EXISTS

Two worlds, one translation problem.

“Humans communicate using meaning. Computers compute using numbers.”

THE CENTRAL QUESTION OF THIS LECTURE

How can meaning encoded in language be represented computationally?

Language feels soft and human — machines need hard numbers. Before bridging that gap, we must face how strange language really is.

02 WHY NATURAL LANGUAGE IS HARD

The Language Challenge Lab

Eleven everyday properties of language that are deceptively easy for humans — and genuinely hard for machines. Click through each challenge.

If language is ambiguous and contextual, what exactly are NLP systems trying to accomplish?

03 MAJOR AREAS OF NLP

Understanding vs Generation

The field is often divided by the direction language flows: into the machine, or out of it.

NLU — NATURAL LANGUAGE UNDERSTANDING

Extract meaning or structure from language.

  • Sentiment
  • Intent
  • POS
  • NER
  • Classification
  • Question understanding

NLG — NATURAL LANGUAGE GENERATION

Generate natural language from information or context.

  • Chatbots
  • Translation
  • Summarization
  • Report generation
  • Text generation

To process language, we first need to understand its basic structure.

04 LANGUAGE STRUCTURE

From a whole corpus to a single character

NLP systems see language as a hierarchy of units. Click to zoom through each level.

How is a sentence structured?

Every word in a sentence performs a grammatical job. Hover the words below.

Grammar is the skeleton of a sentence — and one of the first structures NLP systems learn to see.

05 PARTS OF SPEECH · POS

Every word has a job

Part-of-Speech describes the grammatical role a word performs in a sentence. Hover or focus any word to inspect it.

Why POS is contextual

The grammatical role of a word depends on its context, not only its spelling. Hover each sentence to flip the tag.

POS tagging is an NLP task

Where POS sits among the levels of language

Grammar tells us what a word is doing. But sometimes we need to know what it refers to in the real world.

06 NAMED ENTITY RECOGNITION · NER

Finding the real-world things in text

NER detects spans of text that mention real-world entities — people, places, organizations, dates — and classifies each span into a category.

POS vs NER — same sentence, two different lenses

With grammar and entities in hand, machines can start doing useful work. One sentence — many possible tasks.

07 MAJOR NLP TASKS

One sentence, many jobs

The same input sentence can feed many different NLP tasks. Select a task node to see what it produces.

Different tasks → different output shapes

Before looking at datasets, notice that NLP tasks differ mainly in the shape of their output.

Every task requires examples from which a model can learn.

08 NLP DATASETS

What does an NLP dataset actually look like?

A dataset is a collection of examples — and the shape of an example depends on the task. Browse the seven most common shapes.

Four shapes of labels

Splitting a dataset

A model is evaluated on data it has never seen. One dataset is therefore split into distinct parts.

Once a model produces predictions, how do we know whether those predictions are good?

09 NLP EVALUATION METRICS

Measuring success — per task

Different NLP tasks require different metrics. Use this map as the table of contents for the rest of this section.

Classification metrics

Worked example: a small spam classifier evaluated on 10 emails — 4 actually spam, 6 actually normal.

Why accuracy alone can mislead

POS tagging metrics

NER metrics — entities, not tokens

Translation — BLEU

Summarization — ROUGE

Language modeling — Perplexity

Confusion-matrix sandbox

Move the sliders and watch every metric respond. Try the presets.

The full pipeline — putting it all together

Every NLP project follows the same high-level path from raw language to a measured result.

That is the full loop: language → data → model → output → measurement. So where did all of this come from — and where is it going next?

10 THE MODERN NLP JOURNEY

From rules to Large Language Models

A map of the road ahead. Today’s lecture covered the foundations; each upcoming lecture digs into one milestone.

End-of-lecture knowledge check

Eight quick questions. Instant feedback — no grades, just understanding.