![Page 1: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/1.jpg)
Introduction to Artificial Intelligence
with Python
![Page 2: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/2.jpg)
Language
![Page 3: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/3.jpg)
Natural Language Processing
![Page 4: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/4.jpg)
Natural Language Processing
• automatic summarization
• information extraction
• language identification
• machine translation
• named entity recognition
• speech recognition
• text classification
• word sense disambiguation
• ...
![Page 5: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/5.jpg)
Syntax
![Page 6: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/6.jpg)
"Just before nine o'clock Sherlock Holmes stepped briskly into the room."
![Page 7: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/7.jpg)
"Just before Sherlock Holmes nine o'clock stepped briskly the room."
![Page 8: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/8.jpg)
"I saw the man on the mountain with a telescope."
![Page 9: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/9.jpg)
Semantics
![Page 10: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/10.jpg)
"Just before nine o'clock Sherlock Holmes stepped briskly into the room."
![Page 11: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/11.jpg)
"Sherlock Holmes stepped briskly into the room just before nine o'clock."
![Page 12: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/12.jpg)
"A few minutes before nine, Sherlock Holmes walked quickly into the room."
![Page 13: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/13.jpg)
"Colorless green ideas sleep furiously."
![Page 14: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/14.jpg)
![Page 15: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/15.jpg)
Natural Language Processing
![Page 16: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/16.jpg)
Syntax
![Page 17: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/17.jpg)
formal grammar
a system of rules for generating sentences in a language
![Page 18: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/18.jpg)
Context-Free Grammar
![Page 19: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/19.jpg)
N
she
V
saw
V D
the
N
city
![Page 20: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/20.jpg)
N
she
V
saw
V D
the
N
city
![Page 21: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/21.jpg)
N → she | city | car | Harry | ...
D → the | a | an | ...
V → saw | ate | walked | ...
P → to | on | over | ...
ADJ → blue | busy | old | ...
![Page 22: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/22.jpg)
NP → N | D N
![Page 23: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/23.jpg)
NP → N | D N N
she
NP
![Page 24: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/24.jpg)
NP → N | D N D
the
N
city
NP
![Page 25: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/25.jpg)
VP → V | V NP
![Page 26: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/26.jpg)
V
walked
VP
VP → V | V NP
![Page 27: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/27.jpg)
D
the
N
city
NPV
saw
V
VP
VP → V | V NP
![Page 28: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/28.jpg)
S → NP VP
![Page 29: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/29.jpg)
S → NP VP
D
the
N
city
NPV
saw
V
VPNP
she
S
N
![Page 30: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/30.jpg)
nltk
![Page 31: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/31.jpg)
n-gram
a contiguous sequence of n items from a sample of text
![Page 32: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/32.jpg)
character n-gram
a contiguous sequence of n characters from a sample of text
![Page 33: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/33.jpg)
word n-gram
a contiguous sequence of n words from a sample of text
![Page 34: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/34.jpg)
unigram
a contiguous sequence of 1 item from a sample of text
![Page 35: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/35.jpg)
bigram
a contiguous sequence of 2 items from a sample of text
![Page 36: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/36.jpg)
trigrams
a contiguous sequence of 3 items from a sample of text
![Page 37: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/37.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 38: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/38.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 39: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/39.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 40: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/40.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 41: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/41.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 42: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/42.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 43: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/43.jpg)
"How often have I said to you that when you have eliminated the impossible whatever remains, however improbable, must be the truth?"
![Page 44: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/44.jpg)
tokenization
the task of splitting a sequence of characters into pieces (tokens)
![Page 45: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/45.jpg)
word tokenization
the task of splitting a sequence of characters into words
![Page 46: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/46.jpg)
sentence tokenization
the task of splitting a sequence of characters into sentences
![Page 47: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/47.jpg)
"Whatever remains, however improbable, must be the truth."
![Page 48: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/48.jpg)
"Whatever remains, however improbable, must be the truth."
["Whatever", "remains,", "however", "improbable,", "must", "be", "the", "truth."]
![Page 49: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/49.jpg)
"Whatever remains, however improbable, must be the truth."
["Whatever", "remains,", "however", "improbable,", "must", "be", "the", "truth."]
![Page 50: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/50.jpg)
"Whatever remains, however improbable, must be the truth."
["Whatever", "remains", "however", "improbable", "must", "be", "the", "truth"]
![Page 51: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/51.jpg)
"Just before nine o'clock Sherlock Holmes stepped briskly into the room."
![Page 52: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/52.jpg)
"Just before nine o'clock Sherlock Holmes stepped briskly into the room."
![Page 53: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/53.jpg)
"He was dressed in a sombre yet rich style, in black frock-coat, shining hat, neat brown gaiters, and well-cut pearl-grey trousers."
![Page 54: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/54.jpg)
"He was dressed in a sombre yet rich style, in black frock-coat, shining hat, neat brown gaiters, and well-cut pearl-grey trousers."
![Page 55: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/55.jpg)
"I cannot waste time over this sort of fantastic talk, Sherlock. If you can catch the man, catch him, and let me know when you have done it."
![Page 56: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/56.jpg)
"I cannot waste time over this sort of fantastic talk, Sherlock. If you can catch the man, catch him, and let me know when you have done it."
![Page 57: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/57.jpg)
"I cannot waste time over this sort of fantastic talk, Sherlock. If you can catch the man, catch him, and let me know when you have done it."
![Page 58: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/58.jpg)
"I cannot waste time over this sort of fantastic talk, Sherlock. If you can catch the man, catch him, and let me know when you have done it."
![Page 59: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/59.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes. If you can catch the man, catch him, and let me know when you have done it."
![Page 60: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/60.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes. If you can catch the man, catch him, and let me know when you have done it."
![Page 61: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/61.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes. If you can catch the man, catch him, and let me know when you have done it."
![Page 62: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/62.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes. If you can catch the man, catch him, and let me know when you have done it."
![Page 63: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/63.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes. If you can catch the man, catch him, and let me know when you have done it."
![Page 64: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/64.jpg)
"I cannot waste time over this sort of fantastic talk, Mr. Holmes," he said. "If you can catch the man, catch him, and let me know when you have done it."
![Page 65: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/65.jpg)
Markov Models
![Page 66: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/66.jpg)
![Page 67: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/67.jpg)
Text Categorization
![Page 68: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/68.jpg)
Inbox Spam
![Page 69: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/69.jpg)
😀 🙁
![Page 70: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/70.jpg)
"My grandson loved it! So much fun!"
"Product broke after a few days."
"One of the best games I've played in a long time."
"Kind of cheap and flimsy, not worth it."
![Page 71: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/71.jpg)
"My grandson loved it! So much fun!"
"Product broke after a few days."
"One of the best games I've played in a long time."
"Kind of cheap and flimsy, not worth it."
😀
🙁
😀
🙁
![Page 72: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/72.jpg)
"My grandson loved it! So much fun!"
"Product broke after a few days."
"One of the best games I've played in a long time."
"Kind of cheap and flimsy, not worth it."
😀
🙁
😀
🙁
![Page 73: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/73.jpg)
bag-of-words model
model that represents text as an unordered collection of words
![Page 74: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/74.jpg)
Naive Bayes
![Page 75: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/75.jpg)
Bayes' Rule
= P(b)P(a |b)P(a)
P(b |a)
![Page 76: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/76.jpg)
P(Positive)
P(Negative)
![Page 77: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/77.jpg)
P(😀)
P(🙁)
![Page 78: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/78.jpg)
"My grandson loved it!"
![Page 79: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/79.jpg)
P(😀)
![Page 80: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/80.jpg)
P(😀 | "my grandson loved it")
![Page 81: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/81.jpg)
P(😀 | "my", "grandson", "loved", "it")
![Page 82: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/82.jpg)
P(😀 | "my", "grandson", "loved", "it")
![Page 83: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/83.jpg)
P(😀 | "my", "grandson", "loved", "it")
equal to
P("my", "grandson", "loved", "it" | 😀)
P("my", "grandson", "loved", "it")
P(😀)
![Page 84: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/84.jpg)
P(😀 | "my", "grandson", "loved", "it")
proportional to
P("my", "grandson", "loved", "it" | 😀)P(😀)
![Page 85: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/85.jpg)
P(😀 | "my", "grandson", "loved", "it")
proportional to
P(😀, "my", "grandson", "loved", "it")
![Page 86: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/86.jpg)
P(😀 | "my", "grandson", "loved", "it")
naively proportional to
P(😀)P("my" | 😀)P("grandson" | 😀) P("loved" | 😀) P("it" | 😀)
![Page 87: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/87.jpg)
P(😀) =number of positive samples
number of total samples
![Page 88: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/88.jpg)
P("loved" | 😀) =number of positive samples with "loved"
number of positive samples
![Page 89: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/89.jpg)
P(😀)P("my" | 😀)P("grandson" | 😀) P("loved" | 😀) P("it" | 😀)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
![Page 90: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/90.jpg)
P(😀)P("my" | 😀)P("grandson" | 😀) P("loved" | 😀) P("it" | 😀)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
![Page 91: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/91.jpg)
P(😀)P("my" | 😀)P("grandson" | 😀) P("loved" | 😀) P("it" | 😀)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112
![Page 92: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/92.jpg)
P(😀)P("my" | 😀)P("grandson" | 😀) P("loved" | 😀) P("it" | 😀)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112
![Page 93: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/93.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112
![Page 94: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/94.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112
![Page 95: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/95.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112🙁 0.00006528
![Page 96: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/96.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00014112🙁 0.00006528
![Page 97: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/97.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.6837🙁 0.3163
![Page 98: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/98.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.01 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
![Page 99: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/99.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.00 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
![Page 100: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/100.jpg)
P(🙁)P("my" | 🙁)P("grandson" | 🙁) P("loved" | 🙁) P("it" | 🙁)
😀 🙁
my 0.30 0.20
grandson 0.00 0.02
loved 0.32 0.08
it 0.30 0.40
😀 🙁
0.49 0.51
😀 0.00000000🙁 0.00006528
![Page 101: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/101.jpg)
additive smoothing
adding a value α to each value in our distribution to smooth the data
![Page 102: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/102.jpg)
Laplace smoothing
adding 1 to each value in our distribution: pretending we've seen each value one more time than we actually have
![Page 103: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/103.jpg)
information retrieval
the task of finding relevant documents in response to a user query
![Page 104: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/104.jpg)
topic modeling
models for discovering the topics for a set of documents
![Page 105: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/105.jpg)
term frequency
number of times a term appears in a document
![Page 106: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/106.jpg)
function words
words that have little meaning on their own, but are used to grammatically connect other words
![Page 107: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/107.jpg)
function words
am, by, do, is, which, with, yet, ...
![Page 108: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/108.jpg)
content words
words that carry meaning independently
![Page 109: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/109.jpg)
content words
algorithm, category, computer, ...
![Page 110: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/110.jpg)
inverse document frequency
measure of how common or rare a word is across documents
![Page 111: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/111.jpg)
inverse document frequency
logTotalDocuments
NumDocumentsContaining(word)
![Page 112: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/112.jpg)
tf-idf
ranking of what words are important in a document by multiplying term frequency (TF) by inverse document frequency (IDF)
![Page 113: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/113.jpg)
Semantics
![Page 114: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/114.jpg)
information extraction
the task of extracting knowledge from documents
![Page 115: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/115.jpg)
"When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users later, the social network has taken over most aspects of our personal and professional lives, and is fast becoming the dominant communication platform of the future."
Harvard Business Review, 2011
"Remember, back when Amazon was founded in 1994, most people thought his idea to sell books over this thing called the internet was crazy. A lot of people had never even hard of the internet."
Business Insider, 2018
![Page 116: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/116.jpg)
"When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users later, the social network has taken over most aspects of our personal and professional lives, and is fast becoming the dominant communication platform of the future."
Harvard Business Review, 2011
"Remember, back when Amazon was founded in 1994, most people thought his idea to sell books over this thing called the internet was crazy. A lot of people had never even hard of the internet."
Business Insider, 2018
![Page 117: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/117.jpg)
"When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users later, the social network has taken over most aspects of our personal and professional lives, and is fast becoming the dominant communication platform of the future."
Harvard Business Review, 2011
"Remember, back when Amazon was founded in 1994, most people thought his idea to sell books over this thing called the internet was crazy. A lot of people had never even hard of the internet."
Business Insider, 2018
![Page 118: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/118.jpg)
When {company} was founded in {year},
![Page 119: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/119.jpg)
WordNet
![Page 120: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/120.jpg)
Word Representation
![Page 121: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/121.jpg)
![Page 122: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/122.jpg)
"He wrote a book."
he [1, 0, 0, 0]
wrote [0, 1, 0, 0]
a [0, 0, 1, 0]
book [0, 0, 0, 1]
![Page 123: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/123.jpg)
one-hot representation
representation of meaning as a vector with a single 1, and with other values as 0
![Page 124: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/124.jpg)
"He wrote a book."
he [1, 0, 0, 0]
wrote [0, 1, 0, 0]
a [0, 0, 1, 0]
book [0, 0, 0, 1]
![Page 125: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/125.jpg)
"He wrote a book."
he [1, 0, 0, 0, 0, 0, 0, 0, ...]
wrote [0, 1, 0, 0, 0, 0, 0, ...]
a [0, 0, 1, 0, 0, 0, 0, 0, ...]
book [0, 0, 0, 1, 0, 0, 0, ...]
![Page 126: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/126.jpg)
"He wrote a book."
"He authored a novel."
wrote [0, 1, 0, 0, 0, 0, 0, 0, 0]
authored [0, 0, 0, 0, 1, 0, 0, 0, 0]
book [0, 0, 0, 0, 0, 0, 1, 0, 0]
novel [0, 0, 0, 0, 0, 0, 0, 0, 1]
![Page 127: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/127.jpg)
distribution representation
representation of meaning distributed across multiple values
![Page 128: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/128.jpg)
"He wrote a book."
he [-0.34, -0.08, 0.02, -0.18, 0.22, ...]
wrote [-0.27, 0.40, 0.00, -0.65, -0.15, ...]
a [-0.12, -0.25, 0.29, -0.09, 0.40, ...]
book [-0.23, -0.16, -0.05, -0.57, ...]
![Page 129: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/129.jpg)
"You shall know a word by the company it keeps."
J. R. Firth, 1957
![Page 130: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/130.jpg)
for he ate
![Page 131: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/131.jpg)
for breakfast he ate
![Page 132: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/132.jpg)
for lunch he ate
![Page 133: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/133.jpg)
for dinner he ate
![Page 134: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/134.jpg)
for he ate
![Page 135: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/135.jpg)
word2vec
model for generating word vectors
![Page 136: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/136.jpg)
skip-gram architecture
neural network architecture for predicting context words given a target word
![Page 137: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/137.jpg)
target word
context word
![Page 138: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/138.jpg)
target word
context word
![Page 139: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/139.jpg)
target word
context word
![Page 140: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/140.jpg)
breakfast
lunch
dinner
book
novel
memoir
![Page 141: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/141.jpg)
breakfast
lunchdinner
book
novel
memoir
![Page 142: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/142.jpg)
king - man
king
man
king - man
woman
![Page 143: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/143.jpg)
king - man
king
man
king - man
woman
queen
![Page 144: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/144.jpg)
Language
![Page 145: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/145.jpg)
Artificial Intelligence
![Page 146: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/146.jpg)
Search
O
X X
O X
![Page 147: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/147.jpg)
Knowledge
P → Q
QP
![Page 148: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/148.jpg)
Uncertainty
![Page 149: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/149.jpg)
Optimization
![Page 150: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/150.jpg)
LearningInbox
Spam
![Page 151: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/151.jpg)
Neural Networks
![Page 152: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/152.jpg)
Language
NP
NP PP
ADJ N P N
artificial
intelligence
with
python
![Page 153: with Python - CS50Business Insider, 2018 "When Facebook was founded in 2004, it began with a seemingly innocuous mission: to connect friends. Some seven years and 800 million users](https://reader033.vdocument.in/reader033/viewer/2022060309/5f0a6f547e708231d42b9e2c/html5/thumbnails/153.jpg)
Introduction to Artificial Intelligence
with Python