Fundamentals of
Artificial Intelligence
& Natural Language Processing
Artificial Intelligence | Machine Learning | Deep Learning | Natural Language Processing
PRESENTED BY
Joy Olusanya
Training Manager/ NLP Researcher at Tonative
MODULE 1 Β· FOUNDATIONS
What is Artificial Intelligence?
Engineering View
The art of creating machines that perform functions requiring intelligence when performed by people.
Computer Science View
The branch of computer science concerned with the automation of intelligent behavior.
Philosophical View
Systems that think and act either humanly or rationally, through reasoning and learning.
MODULE 1 Β· FOUNDATIONS
Definition of Artificial Intelligence
β
Artificial Intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems, including the ability to learn from experience, adjust to new inputs, reason through problems, and perform tasks that would normally require human intelligence.
In plain English: AI is a machine that can think, learn, and solve problems like humans.
The 4 core abilities of an AI system:
Learn
Improve from data and past experience without being reprogrammed
Reason
Draw logical conclusions and make decisions from available information
Adapt
Adjust behaviour when faced with new or unexpected situations
Interact
Communicate with humans through language, speech, and actions
Examples: ChatGPT, Siri, self-driving cars, medical diagnosis systems, recommendation engines.
MODULE 1 Β· AI LANDSCAPE
Subfields of Artificial Intelligence
AI is a broad discipline with many specialised areas, each tackling different aspects of intelligence.
Machine Learning
Systems that learn from data and improve without being explicitly programmed
Computer Vision
Enabling machines to interpret and understand visual information from the world
Natural Language Processing
Processing and understanding human language (text and speech)
Robotics
Designing intelligent machines that sense, plan, and act in the physical world
Deep Learning
Multi-layered neural networks that learn complex patterns from massive amounts of data
NLP sits at the heart of AI β bridging human language and machine understanding.
MODULE 1 Β· MACHINE LEARNING
Machine Learning: Definition & Components
β
Machine Learning is a branch of AI that enables systems to automatically learn and improve from experience without being explicitly programmed for every task.
Supervised Learning
Trains on labelled data, every input has a known correct output.
e.g. Spam detection, sentiment analysis, image classification
Unsupervised Learning
Finds hidden patterns in unlabelled data with no predefined answers.
e.g. Customer segmentation, topic modelling, anomaly detection
Reinforcement Learning
An agent learns by interacting with an environment, rewarded for good actions, penalised for bad ones.
e.g. AlphaGo, robotics, autonomous driving
ML vs Deep Learning β What is the connection?
Deep Learning is a type of Machine Learning, but it uses multi-layered neural networks to learn on its own, without humans manually selecting features. All Deep Learning is ML, but not all ML is Deep Learning.
Deep Learning β Machine Learning β Artificial Intelligence
MODULE 1 Β· INTERDISCIPLINARY ROOTS
Foundations of AI
Philosophy
Logic, reasoning, mind as physical system
Mathematics
Algorithms, probability, formal proofs
Psychology
Perception, cognition, behavior
Linguistics
Grammar, knowledge representation
Neuroscience
Brain structure and function
Economics
Rational decision theory
AI is inherently interdisciplinary; no single field owns it.
MODULE 1 Β· HISTORY
A Brief History of AI β Early Years
1950s
Turingβs Test β
"Computing Machinery and Intelligence" β Turing Test proposed
1956
Dartmouth Meeting β
Birth of "Artificial Intelligence" as a field
1958
Lisp Language β
McCarthy defines Lisp, the dominant AI programming language
1965
Resolution Method β
Robinson's complete theorem-proving algorithm for first-order logic
MODULE 1 Β· HISTORY
History of AI β Modern Era
1969β79
Knowledge-Based Systems
1980β88
Expert Systems Boom
1985β95
Neural Networks Return
1987β
Scientific Method
2001β
Big Data Era
HMMs & Bayesian Networks
Probabilistic reasoning for uncertainty
Data Mining
Learning from large datasets
Deep Learning (2010s)
Neural nets at massive scale
MODULE 1 Β· TODAY
AI in the Real World Today
Autonomous Vehicles
Driverless robotic cars using sensors & planning
Speech Recognition
Convert spoken language to text in real-time
Game Playing
IBM Deep Blue defeated world chess champion in 1997
Space Planning
NASA's Remote Agent for spacecraft scheduling
Robotics
Physical automation with adaptive behavior
Machine Translation
Cross-language communication at scale
PART 2
Natural Language
Processing
Enabling computers to understand, analyze, and generate human language
MODULE 2 Β· NLP BASICS
What is Natural Language Processing?
β
Natural Language Processing (NLP) is a subfield of Artificial Intelligence that gives computers the ability to read, understand, interpret, and generate human language in a meaningful and useful way.
In plain English: NLP = teaching computers to read, understand, and respond to human language just like we do.
Computer
Science
Algorithms &
data structures
Linguistics
Grammar,
meaning & syntax
Machine
Learning
Learning from
text data
NLP
Spam detection
Sentiment analysis
Translation
Entity recognition
MODULE 2 Β· TEXT PROCESSING
How Computers Read Text
Step 1 β Raw sentence: "The movie was great. I loved the movie!"
β Step 2: Tokenize (split into words)
The
movie
was
great
.
I
loved
the
movie
!
β Step 3: Bag of Words β count each word (ignore order)
Word
Count
movie
2
great
1
loved
1
the
2
was
1
Why Bag of Words?
Eisenstein (2018): Bag of Words is the foundation of text classification and NLP.
MODULE 2 Β· WORD(TEXT) REPRESENTATIONS
Word Embeddings: Turning Words into Numbers
β The Problem
Bag of Words treats every word as independent.
'king' and 'queen' look completely unrelated.
β The Solution
Word Embeddings place similar words close together in a numeric space capturing meaning!
Each word becomes a list of numbers (a vector):
Word
v1
v2
v3
king
0.8
0.2
0.9
queen
0.7
0.9
0.8
man
0.6
0.1
0.4
woman
0.5
0.8
0.3
π€― Famous Analogy
king β man + woman β queen
Word embeddings learn relationships between words automatically from huge amounts of text data. This powers Google Search, autocomplete, and ChatGPT.
Word2Vec (Google, 2013) was a breakthrough β learned word meaning from 100 billion words of text.
MODULE 2 Β· GRAMMAR
Parts of Speech (POS) Tagging
Assigning grammatical categories to each token is essential for deeper NLP analysis.
NOUN
fish, language, book
VERB
loves, thinks, is
ADJECTIVE
grumpy, happy, quick
ADVERB
slowly, now, here
PRONOUN
I, you, he, they
DETERMINER
the, a, some, many
PREPOSITION
in, on, at, by
CONJUNCTION
and, but, or
POS tags depend on context: 'fish' can be a noun OR a verb depending on usage.
MODULE 2 Β· DATA RESOURCES
Corpora: The Fuel for NLP
A corpus (pl. corpora) is a structured, machine-readable collection of text or speech used to train and test NLP systems.
Brown Corpus
1M words, 1960s American English, categorized by genre
British National Corpus (BNC)
100M words, 90% written + 10% spoken English
Penn Treebank
Wall Street Journal text with POS tags & parse trees
COBUILD (Bank of English)
650M words from news, books, radio, TV
Uses: lexicography, grammar, stylistics, training & evaluating ML models, information extraction.
Tool: NLTK (Natural Language Toolkit) in Python, free corpus access + text processing
MODULE 2 Β· COMPUTATIONAL TOOLS
Stemming, Tagging & Text Analysis
Stemming
Removes word endings to get the root/base form.
Examples:
running β run
POS Tagging
Labels each word with its grammatical category.
Examples:
The/DET cat/NN sat/VBD
John/NNP loves/VBZ
quickly/ADV
Chunking
Groups sequences of tagged words into meaningful phrases.
Examples:
[NP The old cat]
[VP sat on]
[NP the mat]
These tools form the NLP pipeline: Raw Text β Tokenize β Stem β Tag β Chunk β Analyze
MODULE 2 Β· TEXT CLASSIFICATION
Text Classification: Teaching Models to Sort Text
A model reads words, counts them, and decides which category a piece of text belongs to.
"This film was absolutely amazing!"
β NLP β
π POSITIVE
"Boring. Terrible acting. Waste of time."
β NLP β
π NEGATIVE
How does an NLP model learn to classify?
1
Training Data
Show the model thousands of labelled examples
("positive" / "negative" / "spam" etc.)
2
Learn Patterns
Words like 'amazing', 'loved', 'great' β positive
Words like 'boring', 'terrible' β negative
3
Predict New Text
Feed the model a new sentence β it predicts the category based on what it learned
Real examples: spam filters, review ratings, customer feedback, news categories.
MODULE 2 Β· THE NLP PIPELINE
The NLP Pipeline: From Raw Text to Understanding
Every NLP system follows the same basic steps β like an assembly line for language.
1
Data
Data input
β
2
Tokenization
Split text into individual words and punctuation marks.
β
3
Stemming / Lemma
Reduce words to their base form.
'running' β 'run'
β
4
POS Tagging
Label each word: noun, verb, adjective, etc.
β
5
Parsing
Understand the sentence structure and grammar.
β
6
Understanding
Extract meaning, classify intent, or generate output.
Example: "She loves NLP" β [She][loves][NLP] β she/run β PRO/VERB/NOUN β S(NP VP) β Positive sentiment!
MODULE 2 Β· NLP IN ACTION
NLP in Everyday Life
π Named Entity Recognition (NER) β Finding important things in text
Apple
PERSON
was founded by
Steve Jobs
in
California
in
1976
π Sentiment Analysis β Detecting opinion & emotion
"I love this product, it works perfectly!"
POSITIVE β
"Completely broken. Total waste of money."
NEGATIVE β
Language Models β Predicting the next word
"The weather today is ___ "
sunny 42%
cold 28%
rainy 18%
β This is how ChatGPT, autocomplete & smart keyboards work!
MODULE 2 Β· NEURAL NETWORKS
How Neural Networks Understand Language
A neural network isΒ a subset of machine learning, inspired by the human brain's structure, that uses interconnected nodes (neurons) in layers to process data and recognise complex patterns.
Input Layer
Words as
numbers
Hidden Layer
Learns patterns
& features
Output Layer
Prediction
or answer
RNN
(Recurrent)
Reads text word by word, remembers previous words β good for sequences
CNN
(Convolutional)
Scans text looking for key patterns and phrases, like a spotlight
Transformer
(BERT, GPT)
Looks at ALL words at once and their relationships β the current state of the art
MODULE 2 Β· CONVERSATIONAL AI
Chatbots & Virtual Assistants
A chatbot is a program that uses NLP to hold a conversation with a human through text or voice.
π€ User: Book me a flight to Lagos for Friday.
π€ AI: Sure! Departing from where? And do you prefer morning or evening?
π€ User: From Ibadan. Morning please.
π€ AI: Found 3 morning flights. The 7:45 AM costs β¦28,500. Shall I book it?
How a chatbot works β 4 steps:
1. Receive text input from user
2. NLP parses & understands the intent
3. System retrieves info or generates a reply
4. Reply is sent back in natural language
Siri
Alexa
ChatGPT
Key Takeaways
01
AI Defined
AI creates machines that perform intelligent tasks the field spans many subfields and disciplines
02
Learning Types
Supervised, Unsupervised, Reinforcement, and Deep Learning are the main ML Components
03
NLP Defined
NLP gives computers the ability to read, understand, interpret, and generate human language
04
Bag of Words
Computers convert text into word counts the foundation of almost all NLP tasks
05
NLP Pipeline
Raw text β Tokenize β Stem β POS Tag β Parse β Understand β every NLP system follows this flow
06
Word Embeddings
Words are represented as numbers similar words sit close together (king β man + woman β queen)
07
Neural Networks
RNNs, CNNs, and Transformers (BERT, GPT) are the engines powering modern NLP
AI + NLP: Machines that understand language are transforming every industry.
?
SESSION CLOSE
Questions &
Answers
There are no silly questions β only questions not asked.
MODULE 2 Β· WHAT COMES NEXT
WHAT COMES NEXT
NLP is one of the fastest-moving fields in AI
More Languages
Building NLP tools for low-resource languages β Yoruba, Hausa, Igbo, Swahili β so everyone benefits equally.
Large Language Models
GPT-4, Gemini, Claude β models trained on trillions of words that can write, code, translate, and reason.
Multimodal AI
Combining text, images, audio, and video. AI that can watch a video and describe what happened.
Healthcare & Science
NLP reads millions of medical papers, assists doctors, extracts drug interactions, and speeds up research.
Education
Personalised AI tutors that adapt to each student's level, language, and learning style.
AI Regulation
Governments worldwide are creating laws to govern how AI is built and used β ensuring it stays safe and fair.
The best NLP researchers of tomorrow are sitting in classrooms like this one today.
COMING UP NEXT Β· MODULE 2
Next Class
Introduction to Data and Types of NLP Datasets
Text Corpora
Raw or annotated text collections
Labelled Datasets
Human-annotated tags & categories
Web-Scraped Data
News, Wikipedia, forums
Speech Datasets
Transcribed audio for ASR/TTS
Benchmark Datasets
For evaluating NLP models
Multilingual Data
Cross-language & low-resource
Next class, bring examples of text data you encounter daily.