AI Basics
AI Basics
Intelligence
INTELLIGENCE
Intelligence is the computational part of
the ability to achieve goals in the world.
Varying kinds and degrees of intelligence
occur in people, many animals and some
machines.
Artificial intelligence (AI)
Artificial intelligence (AI) is the
intelligence exhibited by machines or
software.
Major AI researchers and textbooks
define this field as "the study and design
of intelligent agents", where an
intelligent agent is a system that
perceives its environment and takes
actions that maximize its chances of
success.
John McCarthy, who coined the term in
1955, defines it as "the science and
engineering of making intelligent
machines".
Main area’s of Research in
AI
reasoning,
knowledge,
planning,
learning,
natural language processing
(communication),
perception and the ability to move and
manipulate objects
Scope of AI
Automated Reasoning
Data Mining
Intelligent Agents
Robotics
Machine Learning
Natural Language Processing
Pattern Recognition
Semantic Web
Artificial Neural Network
10
Post Office
automatic address recognition and sorting of mail
Banks
automatic check readers, signature verification systems
automated loan application classification
Customer Service
automatic voice recognition
The Web
Identifying your age, gender, location, from your Web surfing
Automated fraud detection
Digital Cameras
Automated face detection and focusing
Computer Games
Intelligent characters/agents
FINANCE
Banks use artificial intelligence systems to:
organize operations
invest in stocks
and manage properties.
In August 2001, robots beat humans in a
simulated financial trading competition.
Financial institutions have long used artificial
neural network systems to detect charges or
claims outside of the norm, flagging these for
human investigation.
HOSPITALS AND MEDICINE
Conference resolution
Machine translation
Named entity recognition
Natural language
understanding
Speech recognition
Topic segmentation
Information retrieval
Speech processing
Automatic summarization
Discourse analysis
Morphological segmentation
Natural language
generation
Optical character
recognition
Parsing
History
The first expert systems were created in
the 1970s and then proliferated in the
1980s. Expert systems were among the
first truly successful forms of AI software
Expert systems
Speech Technology
The speech capabilities that can be added to an
application are text-to-speech synthesis (TTS) and
speech recognition (SR).
Text-To-Speech Synthesis (TTS)
This involves turning a string into spoken language that
is played through the computer speakers. The
complexities of turning words into phonemes, adding
appropriate emphasis and translating the result into
digital audio are beyond the scope of this paper and are
catered for by a TTS engine installed on your machine.
The end result is that the computer talks to the user to
save the user having to read some text on the screen.
SPEECH RECOGNITION (SR)
computer takes the user's speech and
interprets what has been said. This
allows the user to control the computer
by voice, rather than having to use the
mouse and keyboard, or alternatively
just dictating the contents of a
document.
The complex nature of translating the
raw audio into phonemes involves a lot
of signal processing.
These details are taken care of by an SR
engine that will be installed on machine.
SR engines are called recognisers and
these days typically implement
continuous speech recognition
Robotics
Robotics is the branch of mechanical
engineering, electrical engineering and
computer science that deals with the design,
construction, operation, and application of
robots, as well as computer systems for their
control, sensory feedback, and information
processing. The word robotics was derived
from the word robot, which was introduced to
the public by Czech writer Karel Čapek in his
play R.U.R. (Rossum's Universal Robots),
which was published in 1920
Aspects of robotics
Robots all have some kind of mechanical
construction, a frame, form or shape
designed to achieve a particular task.
Robots have electrical components
which power and control the machinery.
All robots contain some level of
computer programming code.
Neural network
ARTIFICIAL NEURAL NETWORKS
If [X is a canary]
Then [X is colored
yellow]
[Fritz is colored green] [Fritz is colored Y] ?
[Fritz croaks and eats
flies]
[Fritz is a frog]
Y = green
[Fritz is colored green]
Goal
[Fritz is colored Y]?
CPSC 433 Artificial Intelligence
Backward chaining
Backward chaining (or backward
reasoning) is an inference method that
can be described (in lay terms) as
working backward from the goal(s).
Backward Chaining
Example
[Fritz is colored Y] Knowledge Base
If [X croaks and eats
flies]
Then [X is a frog]
If [X is a frog] If [X is a canary]
Then [X is colored green] Then [X is colored yellow] If [X chirps and sings]
Then [X is a canary]
If [X is a frog]
Then [X is colored
[X is a frog] [X is a canary] green]
If [X is a canary]
Then [X is colored
If [X croaks and eats flies] yellow]
Then [X is a frog]
[Fritz croaks and eats
flies]
[X croaks and eats flies] [Fritz croaks and eats flies]
Goals
[Fritz is colored Y]?
[X is a canary]
CPSC 433 Artificial Intelligence
[X croaks and eats flies]
Application area’s of ES
Week 4
Features of expert system
Overview of expert system’s
programming tools
Benefits and limitations of Experts
systems
Features of expert system
Increased availability
Reduced cost
Reduced danger
Performance
Multiple expertise
Increased reliability
Advantages Continued
85
Explanation
Fast response
Intelligent tutor
Intelligent database
1. DENDRAL
• Task: Take data from instruments and dialog, and diagnose type and
severity of disease
•
8. XCON
• Originally called R1, developed at Carnegie Mellon and DEC in late 70's
• DRILLING ADVISOR:
• GENESIS:
• GATES:
The Intelligent Home - Automated systems can now monitor home security,
environmental conditions and energy usage. Door and windows can be opened
automatically and appliances such as lighting and air conditioning can be pre
programmed to activate. This assists occupants irrespective of their state of mobility.
Military Robots - Airborne robot drones are used for surveillance in today's modern
army. In the future automated aircraft and vehicles could be used to carry fuel and
ammunition or clear minefields
Farms - Automated harvesters can cut and gather crops. Robotic dairies are
available allowing operators to feed and milk their cows remotely.
The Car Industry - Robotic arms that are able to
perform multiple tasks are used in the car
manufacturing process. They perform tasks such as
welding, cutting, lifting, sorting and bending. Similar
applications but on a smaller scale are now being
planned for the food processing industry in particular
the trimming, cutting and processing of various meats
such as fish, lamb, beef.
Semantics Parsing
Applications of Nat. Lang. Processing
Machine Translation
is a sub-field of computational linguistics that
investigates the use of software to translate text or
speech from one natural language to another.
Database Access
Information Retrieval
Selecting from a set of documents the ones that are relevant to a
query
Text Categorization
Sorting text into fixed topic categories
Extracting data from text
Converting unstructured text into structure data
Spoken language control systems
Spelling and grammar checkers
Natural Language Understanding
Input/Output data Processing stage Other data
used
Sentence meaning
loves(john,mary)
NLP - Prof. Carolina Ruiz
Natural language understanding Phases
noun_phrase verb_phrase
determiner
noun
Talking back!
What to say or text planning
flight(AA,london,boston,$560,2pm),
flight(BA,london,boston,$640,10am),
How to say it
“There are two flights from London to Boston. The first
one is with American Airlines, leaves at 2 pm, and
costs $560 …”
Speech synthesis
Simple: Human recordings of basic templates
More complex: string together phonemes in phonetic
spelling of each word
Difficult due to stress, intonation, timing, liaisons between
NLP - Prof. Carolina Ruiz
words
NLG Stages
Programming tools for NLP
See link
http://www.phontron.com/nlptools.php
Week-8
a verb.
She bagged two silver medals.
ambiguity.
Every man loves a woman.[7]
تیزی, ے ).
The anaphoric reference of ‘it’ in the two situations
cause ambiguity.
Steep applies to surface hence ‘it’ can be hill. Tired
http://iselab.cvc.uab.es/tutorials_ise/PPTs/sur
vey/
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Machine Translation
15
1
Machine Translation (MT) is the task of
automatically converting one natural
language into another, preserving the
meaning of the input text, and producing
fluent text in the output language.
(http://www.thelanguagetranslation.com/machine-translation.html)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
History of Machine Translation (Cont..)
15
4
The ALPAC (Automatic Language Processing
Advisory Committee) report in 1966 further
reduced the investment in Machine
translation because the report evaluated the
progress in computational linguistics in
general and machine translation in particular
and was very skeptical (disbelieving) to
research done in machine translation so far
and gave more emphasis to the need for
basic research in computational linguistics.
(http://www.thelanguagetranslation.com/machine-translation.html)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
History of Machine Translation (Cont..)
15
5
However, starting in the late 1970s and beginning
1980s, with the impact of personal computer
revolution, with the increase in computational power,
more interest began to be shown in statistical models
for machine translation.
There was growth in the use of machine translation as a
result of the beginning of less expensive and more
powerful computers.
With the 1990s, the importance of machine translation
further increased (for better or worse) and the use of
"translation engines" on the Internet to allow for
translation of websites and email languages.
(http://www.thelanguagetranslation.com/machine-translation.html )
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
History of Machine Translation (Cont..)
15
6
Today there are many software programs
several of them online for translating
source language.
Such software includes the SYSTRAN
system which powers both Google
translate, AltaVista's Babelfish, StarDict
etc.
These tools produce a rough translation
that gives the summary of the source
text.
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Translation process
(http://en.wikipedia.org/wiki/Example-based_machine_translation)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Example-based MT
16
5
/23 Long-established approach to empirical
MT
First developed in contrast with rule-
based MT
Idea of translation by analogy (Nagao
1984)
Translate by adapting previously seen
examples rather than by linguistic rule
“Existing translations contain more solutions
to more translation problems than any
other available resource.” (P. Isabelle et al.,
TMI, Kyoto, 1993)
EBMT basic idea
16
6
/23
database of translation pairs
match input against example
database
(like Translation Memory)
identify corresponding translation
fragments (align)
recombine fragment into target
text
16
7
Example (Sato & Nagao 1990)
/23
Input
Matches
He buys a notebook.
Kare wa nōto o kau.
Result
[http://www.thelanguagetranslation.com/machine-translation.html]
[http://www.thelanguagetranslation.com/machine-translation.html]
December 2, 2024
Translation Unit (Cont..)
18
8
When a translator segments a text into
translation units, the larger these units are,
better chance there is of obtaining an idiomatic
translation.
This is true not only of human translation, but
also in cases where human translators use
computer-assisted translation, and also when
translations are performed by machine
translation systems.
[Translation Theory,
http://www.translatum.gr/etexts/translation-theory.htm#UnitOfTranslation,
Retrieved date: 09-Jan,2011]
</doc>
Natural Language Processing (NLP) by Rahman Ali, Lect:
QACC, UOP 193
Contents
Referring Expression
Referring expression
Referent
Types of References
Exophora and
Endophora
Types of Endophora
Anaphora and
Cataphora
Types or Categories of Anaphora
Anaphoric/Cataphoric Devices
Anaphora Resolution
Anaphora and Ambiguity
Reading/References
Next Week Plan
194
Reference
Reference is a relation between objects
in which one object designates, or acts
as a means by which to connect to or
link to, another object. The first object in
this relation is said to refer to the second
object.
Referring Expression
196
Referring Expression
( Cont’)
A pretty woman entered the restaurant.
She sat at the table next to mine and only
then I recognized her. This was Amy
Garcia, my next door neighbor from 10
years ago. The woman has totally
changed! Amy was at the time shy…
Referring Expression
Referent
197
Referring Expression: any expressions used to
refer to somebody or someone with the
particular picture in mind (Heasley 1983)
Types of References
We can summaries reference with a
diagram to make it easier to grasp:
199
Exophoric Reference
Exophoric reference, depends on the context
outside the text for its meaning.
In linguistics, Exophora is reference to
something extra-linguistic.
For example
"What is this?",
here "this" is exophoric rather than endophoric, because it refers to
something extra-linguistic, i.e. there is not enough information in
the utterance itself to determine what "this" refers to, but we must
instead observe the non-linguistic context of the utterance (e.g. the
speaker might be holding an unknown object in their hand as they
ask that question.)
200
"Did the gardener water those plants?",
it is quite possible that "those" refers
back to the preceding text, to some
earlier mention of those particular plants
in the discussion.
Endophoric Reference
The pronouns refer to items within the same text;
it is endophoric reference.
Endophora is a linguistic reference to something
intra-linguistic.
For Example:
"I saw Sally yesterday. She was lying on the beach".
Here, "she" is intra-linguistic, and hence endophoric, because it refers to something
(Sally, in this case) already mentioned in the text.
202
Endophora (Another
Definition)
Words or phrases like pronouns are endophora
when they point backwards or forwards to
something in the text:
For example:
As [he]1 was late, [Harry] 1 wanted to phone [his] 1
203
Types of Endophora
1) Cataphora:
The type of endophora in which the referring expression occur
before the referent are termed as cataphora.
204
Anaphora(Another
Definition)
Anaphora is a phenomenon in which
certain textual elements refer to earlier
text elements (called correlates) and
share the meaning of the correlates.
206
Types of Anaphora (On the basis of
position of anaphor and its antecedent)
Intra-sentential/Sentence internal anaphora:
The anaphora in which the AD and its antecedent both
occurs in the same sentence is called sentence internal.
Reflexive pronouns
(himself, herself, itself, themselves) are typical examples of intra-
sentential anaphora.
Possessive pronouns
(his, her, hers, its, their, theirs) can often be used as intra-
sentential anaphors too, and often be in the same clause as the
anaphor.
For example:
[John] 1 took [his] 1 [hat] 2 off and hung [it] 2 on a peg.
207
Types of Anaphora (Cont..)
Inter-sentential/Sentence external
anaphora:
The anaphora in which the AD and its
antecedent doesn’t occur in the same sentence
is called sentence external or inter-sentential
anaphora.
For example:
[Jehansher] 1 Khan was senior player of Sqash. [He] 1
has won several trophies.
[John] 1 took his hat off and hung it on a peg. [He] 1 was
very tied therefore went to slept..
208
Anaphora and Ambiguity
Many anaphors are ambiguous. Like:
A)
Jane told Marry she was in love (ambiguous)
Jane informed Marry she was in love. (Here Jane
is in love)
B)
Jane told marry she was in danger (ambiguous)
Jane warned Marry she was in danger.
209
Anaphora Resolution
Anaphora Resolution == the problem of resolving
what a pronoun, or a noun phrase refers to.
Consider the following Discourse:
210
Agenda
21
1
Natural Language Understanding (NLU)
Ellipsis Definition
Examples of Ellipsis
Origin of the Word Ellipsis
Been to
Karachi
.
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
LEARNING
Learning is the improvement of
performance with experience over time.
Learning element is the portion of a
learning AI system that decides how to
modify the performance element and
implements those modifications.
There are five methods of learning . They
are,
1. Rote learning
2. Direct instruction (by being told)
3. Analogy
4. Induction
5. Deduction
Rote Learning
Rote learning is the memorization of
information based on repetition. The two
biggest examples of rote learning are
the alphabet and numbers.
Example:- Memorizing multiplication
tables, formulate , etc.
Learning by Instruction
This type of learning occur when a
person is instructed about a problem
solution or for new knowledge learning
by an instructor.
For example