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
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
- Recite the slide 4 definition of NLP and its three goals, with one product for each goal.
- Name the three alternative names of the field and say which facet each one stresses.
- Draw and label the Venn of linguistics, computer science and AI, and say what each contributes.
- List the five AI subfields on slide 6 and place deep learning under machine learning.
- 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).
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.
| Company | Product | Goal served | What the language step is |
|---|---|---|---|
| Search and Translate | Human-machine, human-human | Understanding a typed query (BERT), translating text between over 240 languages | |
| Apple | Siri | Human-machine | Recognising speech and holding a back-and-forth conversation |
| Microsoft | Translator | Human-human | Translating conversations, documents and street signs, even offline |
| Twitter (now X) | Feed and moderation | Useful processing | Ranking and filtering a stream of short texts |
| Amazon | Alexa | Human-machine | Streaming speech to the cloud, recognising it, deciding what the user wants |
| Facebook (Meta) | NLLB translation | Human-human | Machine translation across 200 languages |
| Grammarly | Writing assistant | Useful processing | Learning the patterns of good writing from millions of sentences |
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.
Recall
Name the three alternative names on slide 4 and say which facet each stresses.
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.
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.
| Discipline | What it gives NLP | Example in this course |
|---|---|---|
| Linguistics | The object of study: levels of description from sounds to discourse, theories of grammar, the notion of ambiguity | What counts as a word, why 'I made her duck' has at least five readings |
| Computer science | Algorithms and data structures: state space search, dynamic programming, classifiers | A dynamic programming decoder, a hash table of the vocabulary, a spam classifier |
| Artificial intelligence | Learning from data and representing knowledge; choosing the most probable of N interpretations | Training weights from labelled mail, storing facts to answer a question |
| The ellipsis | Mathematics (in practice probability and statistics), plus signal processing and psychology | Probability, linear algebra, vector spaces, the acoustics of speech |
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?
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
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).
| Subfield | What it studies | Example system | Where it touches NLP |
|---|---|---|---|
| Knowledge representation and reasoning | Storing facts and drawing conclusions from them | Google Knowledge Graph (things, not strings) | Question answering over a knowledge graph; disambiguating Taj Mahal the monument from Taj Mahal the musician |
| Machine learning | Learning behaviour from data instead of rules | A spam classifier trained on reported mail | Supplies almost every modern NLP model; deep learning is its sub-area |
| Computer vision | Interpreting images and video | Azure OCR reading posters and product labels | Image captioning and optical character recognition, whose output is text |
| Robotics | Perceiving and acting in the physical world | SayCan mobile manipulator | Following natural language instructions; the robot is the language model's hands and eyes |
Recall
List the five AI subfields on slide 6 and say where deep learning belongs.
Recall
Give one system where NLP meets computer vision and one where it meets 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
- Speech and Language Processing, 3rd edition draftBookJurafsky and MartinFree draft. Chapter 1 lists the names of the field and its links to other disciplines. Primary source for the whole lecture. The slide 25 reference says Prentice-Hall 2020; no such printed edition exists: 2020 matches a 3rd edition online draft, and the last printed edition is the 2nd (Pearson Prentice Hall, 2009).(opens in a new tab)
- Speech and Language Processing, 2nd edition, chapter 1BookJurafsky and Martin (Pearson Prentice Hall, 2009)Origin of the slide 4 definition, the three goals, the names of the field, the wc example, and section 1.3 on search and classifiers.(opens in a new tab)
- What is Computational Linguistics?DocsAssociation for Computational LinguisticsDefinition of computational linguistics, founded 1962 as AMTCL, renamed ACL in 1968, knowledge-based versus data-driven models.(opens in a new tab)
- Deep Learning, chapter 1BookGoodfellow, Bengio and Courville (MIT Press, 2016)Figure 1.4: deep learning inside representation learning inside machine learning inside AI.(opens in a new tab)
- Artificial Intelligence: A Modern Approach, 4th edition, table of contentsBookRussell and Norvig (Pearson, 2020)Parts for knowledge and reasoning, machine learning (with a deep learning chapter), and communicating, perceiving and acting (NLP, vision, robotics).(opens in a new tab)
- Principles of Knowledge Representation and ReasoningDocsKR Inc.The standard name of the subfield the slide calls knowledge representation and deduction; conference series since 1989.(opens in a new tab)
- Show and Tell: A Neural Image Caption GeneratorPaperVinyals, Toshev, Bengio and Erhan, 2014Captioning as a problem that connects computer vision and NLP.(opens in a new tab)
- Do As I Can, Not As I Say: Grounding Language in Robotic AffordancesPaperAhn et al., 2022A robot following natural language instructions as the language model's hands and eyes.(opens in a new tab)
- OCR, Optical Character RecognitionDocsMicrosoft LearnOCR extracts printed and handwritten text from images such as posters and street signs.(opens in a new tab)
- Introducing the Knowledge Graph: things, not stringsArticleGoogle, 2012Entities and relationships; the Taj Mahal disambiguation.(opens in a new tab)
- Understanding searches better than ever beforeArticleGoogle, 2019Search is about understanding language; BERT helps one in ten searches in the U.S. in English.(opens in a new tab)
- Google Translate adds 110 new languagesArticleGoogle, 2024Type, say, handwrite or point the camera; over 240 languages after the 2024 expansion.(opens in a new tab)
- SiriDocsAppleType or talk naturally, back-and-forth conversation.(opens in a new tab)
- What is the Alexa Skills KitDocsAmazonAlexa handles speech recognition and natural language processing in the cloud.(opens in a new tab)
- Microsoft TranslatorDocsMicrosoftConversations, documents and street signs, also offline.(opens in a new tab)
- No Language Left Behind: Scaling Human-Centered Machine TranslationPaperNLLB Team, Meta AI, 2022Machine translation across 200 languages as a key focus of AI research.(opens in a new tab)
- How Grammarly worksDocsGrammarlyAlgorithms that learn the patterns of good writing from millions of sentences.(opens in a new tab)
- Report spam in GmailDocsGoogleAs you report more spam, Gmail identifies similar emails as spam more efficiently.(opens in a new tab)
- Twitter has officially changed its logo to XArticleTechCrunch, 2023For the dated bird logo on slide 2.(opens in a new tab)