Majid Al-RaimiWhat natural language processing is

ICS 582Lecture 01Part 01

What natural language processing is

The definition of NLP, its three goals, its other names, and where it sits at the intersection of linguistics, computer science and artificial intelligence alongside the other AI subfields.

Concepts
3
Slides
1-6
Reading
18 min
Understood
0/3 concepts

Why this part matters

Every later lecture in this course is a tool: tokenizers, n-gram models, classifiers, transformers. This part fixes what the tools are for. It gives you the one definition an examiner can ask on day one and the sentence you will need in the introduction of any NLP paper or thesis chapter.

The deck opens with a slide that carries the footer ICS472, the undergraduate twin of this course.ICS 582 is the graduate version taught by Dr. Irfan Ahmad and uses the same slides, so nothing changes for you. Over six slides it moves from a wall of company logos to a one-sentence definition, then places the field on a map twice: once among its parent disciplines and once among its siblings inside artificial intelligence. We follow the same route, but each stop is an argument rather than a bullet list.

By the end you can

  1. Recite the slide 4 definition of NLP and its three goals, with one product for each goal.
  2. Name the three alternative names of the field and say which facet each one stresses.
  3. Draw and label the Venn of linguistics, computer science and AI, and say what each contributes.
  4. List the five AI subfields on slide 6 and place deep learning under machine learning.
  5. Give one system for each pairing of NLP with vision, robotics and knowledge representation.

Three things you probably did this week. You said "hey Siri, set an alarm for six" and a phone acted on it. A visitor pointed Google Translate's camera at an Arabic menu and read it in English. And Gmail moved a phishing message into spam before you ever saw it. All three are natural language processing, and they are three different jobs: a human talking to a machine, two humans with a machine in the middle, and no conversation at all, just text being handled usefully.

That is exactly how the field defines itself. Slide 4 states it in one sentence: NLP is a branch of artificial intelligence that is concerned with interactions between computers and human language. The purpose clause that follows is the part to memorise, because it lists the three goals in a fixed order: enabling human-machine communication, improving human-human communication, or simply doing useful processing of text or speech. The wording is lifted almost verbatim from the opening of Jurafsky and Martin's textbook, which describes the goal of the field as getting computers to perform useful tasks involving human language, "tasks like enabling human-machine communication, improving human-human communication, or simply doing useful processing of text or speech" (Jurafsky and Martin, 2nd edition, chapter 1).

Three goals, three shapes of interaction: a person and a machine talking, two people bridged by a machine, and text simply being processed.

Notice what the definition does not say. It does not name a technique. It does not say statistics, or neural networks, or grammars. NLP is defined by its problem, human language, and by what it wants to achieve with it. The techniques have moved from hand-written rules to statistical learning to deep neural networks (part 03 walks through that sequence), and the definition has not moved with them. That is why it is worth learning by heart: it will still be true when the current models are obsolete.

The logos, sorted by goal

Slide 2 shows seven companies and says nothing else, so the exercise is to say it for them. Each logo stands for at least one product whose core step is a language step, and each of those products serves one of the three goals. Google Search is the clearest case: in 2019 Google wrote that "Search is about understanding language" and introduced BERT to help it understand one in 10 searches in the U.S. in English better (Google, 2019). Amazon's developer documentation describes the Alexa pipeline as streaming your speech to the cloud, where "the Alexa service handles the speech recognition and natural language processing" (Amazon). Meta's No Language Left Behind project calls machine translation "a key focus of artificial intelligence research today" and covers 200 languages (NLLB Team, 2022). Grammarly says its team of computational linguists and deep learning engineers builds algorithms that learn "the rules and hidden patterns of good writing by analyzing millions of sentences" (Grammarly), which is spelling and grammar correction at industrial scale.

CompanyProductGoal servedWhat the language step is
GoogleSearch and TranslateHuman-machine, human-humanUnderstanding a typed query (BERT), translating text between over 240 languages
AppleSiriHuman-machineRecognising speech and holding a back-and-forth conversation
MicrosoftTranslatorHuman-humanTranslating conversations, documents and street signs, even offline
Twitter (now X)Feed and moderationUseful processingRanking and filtering a stream of short texts
AmazonAlexaHuman-machineStreaming speech to the cloud, recognising it, deciding what the user wants
Facebook (Meta)NLLB translationHuman-humanMachine translation across 200 languages
GrammarlyWriting assistantUseful processingLearning the patterns of good writing from millions of sentences
Every logo on slide 2 mapped to a product, a goal and its language step

One field, many names

Slide 4 ends by admitting that the field "has many names" and lists three. They are not rival fields. Each stresses a different facet of the same work, and the facet tells you who is speaking. When someone says computational linguistics they are usually facing the linguistics side: language as the object of scientific study, with computation as the method. Its professional society is the ACL, which describes itself as serving people working on computational problems involving human language, "a field often referred to as either computational linguistics or natural language processing (NLP)" (ACL). When someone says speech and language processing they are quoting the title of the Jurafsky and Martin book and reminding you that speech is in scope. When someone says human language technology they are on the engineering side, thinking about systems that ship.

The three alternative names on slide 4 and the facet each stresses

Computational linguistics
The linguistics-facing name. The ACL, founded in 1962 as the Association for Machine Translation and Computational Linguistics and renamed in 1968, defines it as the scientific study of language from a computational perspective.
Speech and language processing
The title of the Jurafsky and Martin textbook. It makes explicit that spoken language, not only written text, belongs to the field.
Human language technology
The engineering-facing name. Technology means deployable systems: the search engine, the assistant, the filter, rather than the theory behind them.

The list keeps growing. The current draft of the third edition says the field "has many names corresponding to its many facets, including natural language processing (NLP), computational linguistics, spoken language processing, speech recognition, or most recently simply language modeling" (Jurafsky and Martin, 3rd edition draft, chapter 1). Note the word "recently": language modeling is the newest label, not a replacement for the field.

Recall

State the definition of NLP on slide 4 and its three goals.

A branch of artificial intelligence concerned with interactions between computers and human language. Its goals: enabling human-machine communication, improving human-human communication, or simply doing useful processing of text or speech.

Recall

Name the three alternative names on slide 4 and say which facet each stresses.

Computational linguistics (the linguistics side, whose society is the ACL), speech and language processing (speech is included, and it is the Jurafsky and Martin title), human language technology (the engineering side, deployable systems).

Quick check

Which of these is one of the three other names of the field listed on slide 4?

Quick check

A phishing email is silently moved to the spam folder. Which slide 4 goal does this serve?

Take the spam filter again and ask what you would need to build one. You need to know what counts as a word, that free and FREE!!! are the same word dressed differently, and that "not a scam" flips the meaning of "scam". That is linguistics. You need a classifier, a hash table for the vocabulary, and an algorithm that runs in reasonable time on millions of messages. That is computer science. And you need a way to learn the weights from mail people have reported, and to represent the result as "spam with probability 0.97". That is artificial intelligence.

Slide 5 draws this as a Venn diagram: NLP sits at the intersection of linguistics, computer science (abbreviated Comp. Sci. on the slide) and AI, and the bullet list trails off with an ellipsis. The ellipsis is not decoration. Read against slide 24, which names the fields NLP draws its models, algorithms and theories from as computer science, mathematics and linguistics, the ellipsis stands most plausibly for mathematics (the part of it NLP leans on most is probability and statistics). Jurafsky and Martin go further, listing the foundations of the field as "computer science, linguistics, mathematics, electrical engineering, and psychology" (Jurafsky and Martin, 2nd edition, chapter 1). Electrical engineering enters through the signal processing that speech needs, and psychology through the study of how people actually produce and understand language.

Three circles draw themselves, the lens where all three overlap fills in, and NLP appears at the centre. The dotted fourth circle is the slide's ellipsis; our reading of slide 24 labels it mathematics.

What each parent contributes

The three circles are not interchangeable, and an exam question will often ask you to say what each one brings. Linguistics supplies the object of study and the vocabulary for describing it: the levels of language from sounds through words and sentences to meaning and discourse, the theories of grammar that say which sentences are well formed, and the very idea of ambiguity, which part 04 returns to. Computer science supplies the machinery. Jurafsky and Martin single out "state space search algorithms, such as dynamic programming, and machine learning algorithms, such as classifiers" as the most important (Jurafsky and Martin, 2nd edition, section 1.3). AI supplies learning and knowledge: how to fit a model to data, how to store facts a program can reason over, and the probabilistic stance that, given several possible readings, you should choose the most probable one.

DisciplineWhat it gives NLPExample in this course
LinguisticsThe object of study: levels of description from sounds to discourse, theories of grammar, the notion of ambiguityWhat counts as a word, why 'I made her duck' has at least five readings
Computer scienceAlgorithms and data structures: state space search, dynamic programming, classifiersA dynamic programming decoder, a hash table of the vocabulary, a spam classifier
Artificial intelligenceLearning from data and representing knowledge; choosing the most probable of N interpretationsTraining weights from labelled mail, storing facts to answer a question
The ellipsisMathematics (in practice probability and statistics), plus signal processing and psychologyProbability, linear algebra, vector spaces, the acoustics of speech
What each parent discipline gives NLP

Jurafsky and Martin make the point with the Unix program wc. When it counts bytes and lines it is ordinary data processing. When it counts words it is doing something linguistic, because it needs to know what a word is. The line between data processing and language processing is exactly the linguistics circle: the moment your program relies on knowledge of language, it has crossed into NLP.

Recall

Which three disciplines form the Venn on slide 5, and what does the ellipsis stand for?

Linguistics, computer science and artificial intelligence. The ellipsis stands most plausibly for mathematics (listed on slide 24), in practice probability and statistics, and per Jurafsky and Martin also electrical engineering and psychology.

Photograph a street sign in Riyadh with your phone. Vision finds the sign in the pixels and reads its letters. NLP translates the words on it. A delivery robot could be told "turn left at that sign" and act on it. And a knowledge base knows that the name on the sign is a real district with a location and a history. One photo has just touched four subfields of artificial intelligence, and most of those steps are now learned from data by a fifth.

Slide 6 lists those five subfields as stacked boxes: natural language processing, knowledge representation and deduction, machine learning, computer vision and robotics. Only one box has a sub-bullet: deep learning is indented under machine learning. The same map appears in the standard AI textbook. Russell and Norvig give knowledge representation its own chapter inside a part called "Knowledge, reasoning, and planning", give machine learning its own part with a deep learning chapter inside it, and group natural language processing, computer vision and robotics under "Communicating, perceiving, and acting" (Russell and Norvig, 4th edition, table of contents). The slide is the textbook's contents page compressed to five lines.

  • Natural language processing
  • Knowledge representation and deduction (standard phrase: reasoning)
  • Machine learning, with deep learning as its sub-area
  • Computer vision
  • Robotics
AI branches into five subfields. Deep learning hangs under machine learning, and machine learning also feeds every other branch: it is a sibling and a tool at once.

Sibling and tool at once

The key point of the slide is why deep learning is indented rather than listed beside the others. Machine learning is a subfield in its own right, but it is also the main method NLP, computer vision and robotics now use, and an increasingly common one in knowledge representation as well. Goodfellow, Bengio and Courville draw this as nested sets: deep learning is a kind of representation learning, which is a kind of machine learning, "which is used for many but not all approaches to AI" (Goodfellow et al., 2016, figure 1.4). The nesting is why the slide indents deep learning, and the "used for" clause is why the AI textbook has both a chapter called Natural Language Processing and one called Deep Learning for Natural Language Processing. It is also why the rest of ICS 582 is mostly machine learning: the problem is language, the method is learning.

The pairings between NLP and its siblings are concrete systems you can name in an exam. With computer vision, image captioning: Vinyals and colleagues describe automatically describing an image as a problem that "connects computer vision and natural language processing" (Vinyals et al., 2014). Optical character recognition is the other direction, a vision task that extracts "printed or handwritten text from images such as posters, street signs, and product labels" and hands it to NLP (Microsoft Learn). With robotics, instruction following: the SayCan system completes "long-horizon, abstract, natural language instructions on a mobile manipulator", with the robot acting as the language model's "hands and eyes" (Ahn et al., 2022). With knowledge representation, question answering over a knowledge graph: Google's Knowledge Graph understands "real-world entities and their relationships to one another: things, not strings", and uses that to tell the Taj Mahal monument from the musician (Google, 2012).

SubfieldWhat it studiesExample systemWhere it touches NLP
Knowledge representation and reasoningStoring facts and drawing conclusions from themGoogle Knowledge Graph (things, not strings)Question answering over a knowledge graph; disambiguating Taj Mahal the monument from Taj Mahal the musician
Machine learningLearning behaviour from data instead of rulesA spam classifier trained on reported mailSupplies almost every modern NLP model; deep learning is its sub-area
Computer visionInterpreting images and videoAzure OCR reading posters and product labelsImage captioning and optical character recognition, whose output is text
RoboticsPerceiving and acting in the physical worldSayCan mobile manipulatorFollowing natural language instructions; the robot is the language model's hands and eyes
NLP meets its sibling subfields

Recall

List the five AI subfields on slide 6 and say where deep learning belongs.

Natural language processing, knowledge representation and deduction, machine learning, computer vision, robotics. Deep learning is a sub-area of machine learning, not a sixth subfield.

Recall

Give one system where NLP meets computer vision and one where it meets robotics.

Image captioning or OCR for computer vision. A robot following natural language instructions, such as SayCan on a mobile manipulator, for robotics.

Quick check

On slide 6, which AI subfield contains deep learning as its sub-bullet?

Quick check

Which pairing matches a slide 6 subfield with a system where it meets NLP?

Recap

If you remember nothing else

  • NLP is a branch of artificial intelligence concerned with interactions between computers and human language.
  • Its goals are enabling human-machine communication, improving human-human communication, or simply doing useful processing of text or speech. Speech is inside the definition.
  • Computational linguistics, speech and language processing and human language technology name the same field from the linguistics, speech and engineering sides.
  • NLP sits at the intersection of linguistics (levels and grammar), computer science (algorithms and data structures) and AI (learning and knowledge); slide 24 suggests mathematics is what the ellipsis hides.
  • The AI subfields on slide 6 are NLP, knowledge representation and deduction (the standard phrase is reasoning), machine learning, computer vision and robotics.
  • Deep learning is a sub-area of machine learning, and machine learning is both a sibling of NLP and the tool every other subfield now uses.
  • NLP meets computer vision in captioning and OCR, robotics in instruction following, and knowledge representation in question answering over knowledge graphs.

Sources