0% found this document useful (0 votes)
8 views

AI Basics

Uploaded by

Cs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

AI Basics

Uploaded by

Cs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 223

Father of Artificial

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

Artificial neural networks


A computer representation of knowledge
that attempts to mimic the neural
networks of the human body.
Narrow AI
 Narrow AI, also known as Weak AI, refers
to artificial intelligence systems that are
designed and trained for a specific task
or a narrow set of tasks. Unlike General
AI, which aims to possess human-like
cognitive abilities across various
domains, Narrow AI is focused on
excelling in a dedicated function
Narrow AI
General AI
 General AI, or Strong AI, refers to a type of artificial intelligence
that possesses the ability to understand, learn, and apply
knowledge across a broad range of tasks—similar to human
intelligence. Unlike Narrow AI, which is designed for specific
functions, General AI aims to exhibit versatility in problem-
solving and cognitive abilities, mirroring the adaptability and
comprehensive understanding characteristic of human minds.
 The concept of General AI involves creating machines or
systems that can perform any intellectual task that a human
being can. This includes tasks such as reasoning, learning from
experience, understanding natural language, and adapting to
different environments. As of now, achieving General AI
remains largely theoretical, and no system has demonstrated
the breadth of cognitive capabilities inherent in human
intelligence on a large scale.
• Expert systems. These AI-based systems mimic human
judgement. They can recommend medicine based on patient
data and predict molecular structure, for example
• Self-driving cars. These AI-guided vehicles recognize other
vehicles, people and objects on the road and adhere to driving
rules and regulations.
• Language model Generative Pre-trained Transformer. GPT-3 and
GPT-4 are release versions of a program from OpenAI that can
automatically generate human language. The technology is
consistently able to emulate general human intelligence. In
some cases, the text is indistinguishable from human output;
however, the AI output is often flawed.
• Music AIs. Dadabots is an AI algorithm that, given a body of
existing music, can generate a stream of its own approximation
of that music.
Super AI (strong AI)

Super AI” typically refers to a hypothetical advanced form of artificial


intelligence (AI) that surpasses human intelligence across a wide range of
cognitive abilities. It’s often associated with the idea of artificial general
intelligence (AGI), which refers to AI systems that can understand, learn,
and apply knowledge in a way that is indistinguishable from human
intelligence.
APPLICATION
Intelligent Systems in Your Everyday Life

 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

 A medical clinic can use artificial


intelligence systems to organize
 bed schedules
 make a staff rotation
 provide medical information and other
important tasks.
 Artificial neural networks are used
as clinical decision support
systems for medical diagnosis, such as
in Concept Processing technology
in EMR software.
 Computer-aided interpretation of medical
images
Such systems help scan digital
images, e.g. from computed tomography,
for typical appearances and to
highlight conspicuous sections, such as
possible diseases. A typical application is
the detection of a tumor.
 Heart sound analysis
HEAVY INDUSTRY
 Robots have proven effective in jobs that
are very repetitive which may lead to
mistakes or accidents due to a lapse in
concentration and other jobs which
humans may find degrading.
 Japan is the leader in using and
producing robots in the world.
 In 1999, 1,700,000 robots were in use
worldwide.
TRANSPORTATION
 Fuzzy logic controllers have been
developed for automatic gearboxes in
automobiles.
 For example, the 2006 Audi TT, VW
Toureg VW Caravell feature the DSP
transmission which utilizes Fuzzy Logic.
A number of Škoda variants also
currently include a Fuzzy Logic based
controller.
TELECOMMUNICATIONS MAINTENANCE

 Many telecommunications companies


make use of heuristic search in the
management of their workforces
 for example BT Group has deployed
heuristic search in a scheduling
application that provides the work
schedules of 20,000 engineers.
Toys and games
 The 1990s saw some of the first attempts to mass-
produce domestically aimed types of basic Artificial
Intelligence for education, or leisure.
 Digital Revolution
 Tamagotchis and Giga Pets, iPod Touch,
 The Internet
 The first widely released robot, Furby
 Aibo, a robotic dog with intelligent features
and autonomy.
 AI has also been applied to video games, for
example video game bots, which are designed to
stand in as opponents where humans aren't available
or desired
AVIATION
 The Air Operations Division (AOD) uses AI
for the rule based expert systems.
 The AOD has use for artificial
intelligence for surrogate operators for
combat and training simulators
1. Mission management aids
2. Support systems for tactical decision
making
3. Post processing of the simulator data into
symbolic summaries.
 Airplane simulators are using artificial
intelligence in order to process the data
taken from simulated flights.
 The computers are able to come up with the
best success scenarios in these situations.
 The computers can also create strategies
based on the placement, size, speed and
strength of the forces and counter forces.
Pilots may be given assistance in the air
during combat by computers.
SPEECH RECOGNITION
 In the 1990s, computer speech
recognition reached a practical level for
limited purposes.
 United Airlines has replaced its keyboard
tree for flight information by a system
using speech recognition of flight
numbers and city names.
Natural Language Processing (NLP)
Natural language
processing (NLP)
 is a field of computer science, artificial
intelligence, and linguistics concerned with the
interactions between computers and human
(natural) languages.
 As such, NLP is related to the area of human–
computer interaction.
 Many challenges in NLP involve natural
language understanding, that is, enabling
computers to derive meaning from human or
natural language input, and others
involve natural language generation.
Major tasks in NLP

 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

 In artificial intelligence, an expert


system is a computer system that
emulates the decision-making ability of a
human expert
 Expert systems are designed to solve
complex problems by reasoning about
knowledge, represented primarily as if–
then rules rather than through
conventional procedural code
Computer vision
Computer vision

 Computer vision is a field that includes


methods for acquiring, processing,
analyzing, and understanding images
and, high-dimensional data from the real
world in order to produce numerical or
symbolic information, in the forms of
decisions.
Applications for computer vision

 Applications range from tasks such as


industrial machine vision systems
 Computer vision covers the core
technology of automated image analysis
which is used in many fields.
APPLICATIONS OF COMPUTER VISION
INCLUDE
 Controlling processes: an industrial robot
 Navigation: by an autonomous vehicle or mobile robot;
 Detecting events: for visual surveillance or people
counting
 Organizing information: for indexing databases of
images and image sequences;
 Modeling objects or environments: medical image
analysis or topographical modeling;
 Interaction: as the input to a device for computer-
human interaction
 Automatic inspection: in manufacturing applications.
Overview of relations between computer vision and other fields
SPEECH RECOGNITION AND GENERATION
Speech recognition and generation

 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

 In machine learning, artificial neural


networks (ANNs) are a family of
statistical learning algorithms inspired
by biological neural networks and are
used to estimate
or approximate functions that can
depend on a large number of inputs and
are generally unknown.
Virtual reality
• Virtual reality, is a computer-
simulated environment that can simulate
physical presence in places in the real
world or imagined worlds.
• Virtual reality can recreate sensory
experiences, which include virtual
taste, sight, smell, sound, touch, etc.
• It is also known as immersive
multimedia
GAMES
 The use of graphics, sound and input
technology in video games can be
incorporated into VR
 the Virtual Boy developed by Nintendo,
the iGlasses developed by Virtual I-O,
the Cybermaxx developed by Victormaxx
and the VFX-1 developed by Forte
Technologies
 There is also a new high field of view VR
headset system in development
designed specifically for gaming called
the Oculus Rift
TRAINING
 The usage of VR in a training perspective
is to allow professionals to conduct
training in a virtual environment where
they can improve upon their skills
without the consequence of failing the
operation.
 VR plays an important role in combat
training for the military
Expert system

 In artificial intelligence, an expert


system is a computer system that
emulates the decision-making ability of a
human expert.
Evaluation of Expert System
 Expert systems were introduced by the
Stanford Heuristic Programming Project
led by Feigenbaum, who is sometimes
referred to as the "father of expert
systems".
 The Stanford researchers tried to identify
domains where expertise was highly
valued and complex, such as diagnosing
infectious diseases (Mycin) and
identifying unknown organic molecules
(Dendral).
Structure of Expert System
Knowledge Acquisition
Knowledge base
 Knowledge base – collection of information
obtained from books, magazines,
knowledgeable persons, etc.
Inference Engine
User Interface
Types of Expert Systems
 Expert systems are divided in two types
based on inference engine.
 Forward Chaining inference Engine
 Backward Chaining Inference Engine
Forward Chaining
 In artificial intelligence (AI) systems,
forward chaining refers to a scenario
where the AI has been provided with a
specific problem must "work forwards" to
figure out how to solve the set problem.
To do this, the AI would look back
through the rule-based system to find
the "if" rules and determine which rules
to use.
Forward Chaining Example
Knowledge Base
If [X croaks and eats flies]
[Fritz croaks and eats flies] If [X croaks and eats
Then [X is a frog] flies]
Then [X is a frog]

If [X chirps and sings]


Then [X is a canary]
If [X is a frog]
[Fritz is a frog] If [X is a frog]
Then [X is colored green] Then [X is colored
green]

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 = Fritz, Y = green [X is a frog]

[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

 • Goal driven reasoning or backward chaining - an inference


technique which uses IF THEN rules to repetitively break a
goal into smaller sub-goals which are easier to prove;
 • Coping with uncertainty - the ability of the system to
reason with rules and data which are not precisely known;
 • Data driven reasoning or forward chaining - an inference
technique which uses IF THEN rules to deduce a problem
solution from initial data;
 • Data representation - the way in which the problem specific
data in the system is stored and accessed;
 • User interface - that portion of the code which creates an
easy to use system;
 • Explanations - the ability of the system to explain the
reasoning process that it used to reach a recommendation.
 Jess is a rule engine for the Java
platform that was developed by
Ernest Friedman-Hill of
Sandia National Labs.
 CLIPS is a public domain software tool
for building expert systems. The name is
an acronym for "C Language Integrated
Production System."
Advantages of Expert Systems
84

 Increased availability
 Reduced cost
 Reduced danger
 Performance
 Multiple expertise
 Increased reliability
Advantages Continued
85

 Explanation

 Fast response

 Steady, unemotional, and complete responses at


all times

 Intelligent tutor

 Intelligent database
1. DENDRAL

• First expert system

• Project began at Stanford in mid 1960's, and is still being used.

• Domain: Organic chemistry - mass spectrometry

• Task: identify molecular structure of unknown compounds


from mass spectra data
2. MACSYMA
• Developed at MIT since 1968 onwards

• Domain: high-performance symbolic math (algebra, calculus,


differential equations,...)

• Task: carry out complex mathematical derivations


3. Hearsay I and II

• Developed at Carnegie-Mellon in late 1960's

• Domain: speech understanding for simple database query

• Task: Using specific vocabulary and grammar criteria, generate


correct speech recognition
4. INTERNIST/CADUCEUS
• Developed at U of Pittsburgh in early 1970's thru mid 80’s

• Domain: diagnostic aid for all of internal medicine

• Task: medical diagnosis given interactive input


5. MYCIN
• Stanford U in mid 70's

• Domain: Medical diagnosis for bacterial and meningitis infections

• Task: interview physician, make diagnosis and therapy recommendations


6. Prospector
• Developed at SRI international in late 1970's

• Domain: exploratory geology

• Task: evaluate geological sites


.
7. PUFF
• Developed at Stanford in 1979

• Domain: Diagnosis of obstructive airway diseases using MYCIN's


inference engine and a new knowledge base

• 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

• Domain: configure computer hardware


Some other famous systems
• DELTA/CATS:

- diagnose and repair diesel locomotives


- developed in LISP, but ported to FORTRAN (a common phenomenon)

• DRILLING ADVISOR:

- diagnose oil drilling problems


- rule-based, exhaustive backward chaining with uncertainty, frames

• GENESIS:

- designs molecular genetics experiments and procedures


- was used by over 500 research scientists

• GATES:

- airline gate assignment and tracking system


- used by TWA at JFK airport
- implemented in Prolog on microcomputers
- access database for 100 daily flights, and creates gate assignment in 30 seconds
(experts took between 10 and 15 hours, with 1 hour per modification)
( possible extension: lost luggage!)
Week 5
 Robotics:
 Reasons to use a robot
 Main application areas
 Laws of robotics
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.
Reasons to use a robot

 Robots are powerful machines that give


us access to places that are otherwise
inaccessible to the human population.
They protect us from danger by
performing tasks that are harmful to our
health.
 Some of the first robots were used in the
1940s to handle radioactive materials.
 Since then robots have become permanent
members of the industrial workforce,
including parts handling, welding, and
painting.
 Robots simulate many human functions.
They can move, sense their surroundings,
and respond to changes in the environment.
Many robots are mechanical arms attached
to a base. Robotic arms use flexible joints to
perform tasks that require very precise
movements.
 Medical robots are now so advanced that
they are being employed in brain, heart
and eye surgeries, allowing doctors to
treat conditions that were previously
only possible through treatments nearly
as dangerous as the offending condition.
Robotics Applications
 Outer Space - Manipulative arms that are controlled by a human are used to unload
the docking bay of space shuttles to launch satellites or to construct a space station

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.

Exploration - Robots can visit environments that are harmful to humans. An


example is monitoring the environment inside a volcano or exploring our deepest
oceans. NASA has used robotic probes for planetary exploration since the early
sixties.

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.

Hospitals - Under development is a robotic suit that will


enable nurses to lift patients without damaging their
backs. Scientists in Japan have developed a power-
assisted suit which will give nurses the extra muscle
they need to lift their patients - and avoid back injuries.
 Disaster Areas - Surveillance robots fitted with
advanced sensing and imaging equipment can
operate in hazardous environments such as
urban setting damaged by earthquakes by
scanning walls, floors and ceilings for structural
integrity.

Entertainment - Interactive robots that exhibit


behaviors and learning ability. SONY has one
such robot which moves freely, plays with a ball
and can respond to verbal instructions.
Laws of Robotics
 A robot may not injure a human being or,
through inaction, allow a human being to come
to harm.
 A robot must obey orders given it by human

beings except where such orders would conflict


with the First Law.
 A robot must protect its own existence as long

as such protection does not conflict with the


First or Second Law.
By Isaac Asimov's was an American author and
professor of biochemistry at Boston University,
 Final Term Course
Week 6
 Types of robots
 Components of a typical robot
 Characteristics of robotics
 Robot sensors
 Robots programming tools
Types of Robotes
Main Components of robot
CONTROLLER :
Every robot is connected to a computer,
which keeps the pieces of the arm
working together. This computer is
known as the controller. The controller
functions as the "brain" of the robot. The
controller also allows the robot to be
networked to other systems, so that it
may work together with other machines,
processes, or robots.
 ARM :
Robot arms come in all shapes and sizes.
The arm is the part of the robot that
positions the end-affector and sensors to
do their pre-programmed business.
 DRIVE :
The drive is the "engine" that drives the
links (the sections between the joints
into their desired position. Without a
drive, a robot would just sit there, which
is not often helpful. Most drives are
powered by air, water pressure, or
electricity.
 END- EFFECTOR :
The end-effector is the "hand" connected
to the robot's arm. It is often different
from a human hand - it could be a tool
such as a gripper, a vacuum pump,
tweezers, scalpel, blowtorch - just about
anything that helps it do its job. Some
robots can change end-effectors, and be
reprogrammed for a different set of
tasks.
 SENSOR :
Most robots of today are nearly deaf and
blind. Sensors can provide some limited
feedback to the robot so it can do its job.
Compared to the senses and abilities of
even the simplest living things, robots
have a very long way to go.
Characteristics of Robots
Robotic sensing

 Robotic sensing is a branch of robotics


science intended to give robots sensing
capabilities, so that robots are more
human-like. Robotic sensing mainly gives
robots the ability to see.
Robots Sensors
 Week-7
 Natural Language Processing(N LP)
 Natural languages vs. computer
languages
 Natural language understanding (NLU)
 Natural language generation (NLG)
 Domain areas of NLP
 Programming tools for NLP
What is Natural Language Processing
(NLP)
123

 The process of computer analysis of input


provided in a human language (natural
language), and conversion of this input into
a useful form of representation.
 The field of NLP is primarily concerned with
getting computers to perform useful and
interesting tasks with human languages.
 The field of NLP is secondarily concerned
with helping us come to a better
understanding of human language.
BİL711 Natural Language Processing
Forms of Natural Language
 The input/output of a NLP system can
be:
 written text
 speech
Components of NLP

 Natural language generation systems convert


information from computer databases into
readable human language.
 Natural language understanding systems
convert human language into representations
that are easier for computer programs to
manipulate.
Where does it fit in the CS
taxonomy?
Computers

Databases Artificial Intelligence … Algorithms Networking

Robotics Natural Language Processing Search …

Information Machine Language


Retrieval Translation Analysis

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

Frequency spectrogram freq. of diff.


speech recognition sounds

Word sequence grammar of


“He loves Mary” syntactic analysis language

Sentence structure meanings of


semantic analysis words
He loves Mary
Partial Meaning context of
x loves(x,mary) pragmatics utterance

Sentence meaning
loves(john,mary)
NLP - Prof. Carolina Ruiz
Natural language understanding Phases

 1) Morphological Analysis: Individual words are analyzed into their


components and non word tokens, such as punctuation are separated from
the words. Consider the sentence:
Example
The man looked at the horses.
 The plural ending –s in horses is dependent on the noun horse to receive
meaning and can therefore not be a word. Horses however, is a word, as it
can occur in other positions in the sentence or stand on its own:

The horses looked at the man.


- What is the man looking at? - Horses.
 Words are thus both independent since they can be separated from other
words and move around in sentences, and the smallest units of language
since they are the only units of language for which this is possible.
 2) Syntactic Analysis: Linear sequences
of words are transformed into structures
that show how the words relate each
other. Some word sequences may be
rejected if they violate the languages
rules for how words may be combined.
Syntactic Analysis - Parsing
sentence

noun_phrase verb_phrase

proper_noun verb noun_phrase

determiner
noun

“Mary” “ate” “the”


“apple”
NLP - Prof. Carolina Ruiz
 3) Semantic Analysis: The structures
created by the syntactic analyzer are
assigned meanings.
4) Pragmatics
 Uses context of utterance
 Where, by who, to whom, why, when it was
said
 Intentions: inform, request, promise,
criticize, …
 Handling Pronouns
 “Mary eats apples. She likes them.”
 She=“Mary”, them=“apples”.
 Handling ambiguity
 Pragmatic ambiguity: “you’re late”: What’s
the speaker’s intention: informing or
criticizing?
NLP - Prof. Carolina Ruiz
5) Phonology
 Phonology is a branch of linguistics
concerned with the systematic
organization of sounds in languages.
Natural Language Generation (NLG)

 Natural Language Generation (NLG)


Systems which take information from
some database and figure out how to
present it to a human. Very little
linguistics involved.
Natural Language
Generation

 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

 Problems in Natural Languages


 Ambiguity:
 Lexical
 Syntactic
 Semantic
 Anaphoric
 Pragmatics
 Imprecision
 Inaccuracy
 Incompleteness
 Solution of the NL problems
Ambiguity
 Ambiguity can be referred as the ability
of having more than one meaning or
being understood in more than one way.
Ambiguities in Natural Language
Processing
1) Lexical Ambiguity: is the ambiguity of a single word. A
word can be ambiguous with respect to its syntactic
 class.Eg: book, study.

 For eg: The word silver can be used as a noun, an adjective, or

a verb.
 She bagged two silver medals.

 She made a silver speech.

 His worries had silvered his hair.

 Lexical ambiguity can be resolved by Lexical category

disambiguation i.e, parts-of-speech tagging. As many words


may belong to more than one lexical category part-of-speech
tagging is the process of assigning a part-of-speech or
 lexical category such as a noun, verb, pronoun, preposition,

adverb, adjective etc. to each word in a sentence.


 2) Syntactic Ambiguity: The
structural ambiguities were
syntactic ambiguities.
 Structural ambiguity is of two kinds:
Scope Ambiguity and Attachment
Ambiguity.
2.1 Scope ambiguity involves operators and quantifiers.
 Consider the example:

 Old men and women were taken to safe locations.

 The scope of the adjective (i.e., the amount of text it

qualifies) is ambiguous. That is, whether the structure (old


men and
 women) or ((old men) and women)?

 The scope of quantifiers is often not clear and creates

ambiguity.
 Every man loves a woman.[7]

 The interpretations can be, For every man there is a woman

and also it can be there is one particular woman who is


 loved by every man.
 2.2) Attachment Ambiguity
 A sentence has attachment ambiguity if a constituent fits more
than one position in a parse tree. Attachment ambiguity arises
from uncertainty of attaching a phrase or clause to a part of a
sentence.
 Consider the example:
 The man saw the girl with the telescope.[2]
 It is ambiguous whether the man saw a girl carrying a telescope,
or he saw her through his telescope.
 The meaning is dependent on whether the preposition ‘with’ is
attached to the girl or the man.
 Consider the example:
 Buy books for children
 Preposition Phrase ‘for children’ can be either adverbial and attach
to the verb buy or adjectival and attach to the object noun books.

3) Semantic Ambiguity: This occurs when the meaning of the words
themselves can be misinterpreted. Even after the syntax and the meanings of the
individual words have been resolved, there are two ways of reading the sentence.
 Consider the example,
 Seema loves her mother and Sriya does too.
 The interpretations can be Sriya loves Seema’s mother or Sriya likes her own mother.
 Semantic ambiguities born from the fact that generally a computer is not in a position to
distinguishing what is logical from what is not.
 Consider the example:
 The car hit the pole while it was moving.
 The interpretations can be The car, while moving, hit the pole and The car hit the pole
while the pole was moving. The first interpretation is preferred to the second one because
we have a model of the world that helps us to distinguish what
 is logical (or possible) from what is not. To supply to a computer a model of the world is
not so easy.[4]
 Consider the example:
 We saw his duck
 Duck can refer to the person’s bird or to a motion he made.
 Semantic ambiguity happens when a sentence contains an ambiguous word or phrase.
 4) Anaphoric Ambiguity: Anaphoras are the
entities that have been previously
introduced into the discourse.
 Consider the example,

 The horse ran up the hill. It was very steep (‫ڈھلوان‬

‫تیزی‬, ‫ے‬ ).
 The anaphoric reference of ‘it’ in the two situations

cause ambiguity.
 Steep applies to surface hence ‘it’ can be hill. Tired

applies to animate object hence ‘it’ can be horse.


Agenda
14
9
 Machine Translation
 Why Machine Translation
 History of MT
 Approaches to MT
 MT Application
 Recent Research
 Strategies of MT
 Types of MT
 Next Week Plan
 The End
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Machine Translation
15
0

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://nlp.stanford.edu/projects/mt.shtml, Retrieval date: 28


Nov, 2010)

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Why Machine Translation or Goals of
MT ???
15
2
 Cheap, universal access to world’s online
information regardless of original
language.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
History of Machine
15
Translation
3
 The history of machine translation started way back in
the 1950s.
 The first work of translation was published in 1954 in
the Georgetown experiment involving fully automatic
translation of more than 60 Russian sentences into
English.
 The experiment was a great success and the authors
claimed that machine translation would be used in
translations within three or five years.
 However, the real progress was very slow.

(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

 The human translation process may be


described as:
 Decoding the meaning of the source text
; and
 Re-encoding this meaning in the target
language.
Bilingual MT
 A bilingual dictionary or translation
dictionary is a specialized dictionary used to
translate words or phrases from one language
to another. Bilingual dictionaries can be
unidirectional, meaning that they list the
meanings of words of one language in another,
or can be bidirectional, allowing translation to
and from both languages. Bidirectional bilingual
dictionaries usually consist of two sections,
each listing words and phrases of one language
alphabetically along with their translation.
Multilingual MT
 A Multilingual MT or translation dictionary is
a specialized dictionary used to translate
words or phrases from one language to several
other languages. Multilingual MT can be
unidirectional, meaning that they list the
meanings of words of one language in another,
or can be bidirectional, allowing translation to
and from both languages. Multilingual MT
usually consist of two sections, each listing
words and phrases of one language
alphabetically along with their translation.
Approaches of Machine Translation
16
0
 Rule-based MT
 Example-based MT
 Statistical Based MT
 Hybrid MT

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Rule-based Machine Translation (RBMT
16
1
 Also known as “Knowledge-based Machine
Translation”; “Classical Approach” of MT).
 Machine translation systems that are based on
linguistic information about source and target
languages basically retrieved from (bilingual)
dictionaries and grammars covering the main
semantic, morphological, and syntactic regularities of
each language respectively.
 This approach of MT make use of morphological,
syntactic, and semantic analysis of both the source
and the target languages involved in a concrete
translation task.
(http://en.wikipedia.org/wiki/Rule-based_machine_translation)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Basic principles

 A girl eats an apple. Source Language =


English; Demanded Target Language =
German Minimally, to get a German
translation of this English sentence one
needs:
 A dictionary that will map each English word
to an appropriate German word.
 Rules representing regular English sentence
structure.
 Rules representing regular German sentence
structure.
 A girl eats an apple. => Ein Mädchen
isst einen Apfel.
Example-based Machine Translation
16
(EBMT)
4
 EBMT approach to machine translation is often
characterized by its use of a bilingual corpus with
parallel texts as its main knowledge base, at run-time.
 It is essentially a translation by analogy and can be
viewed as an implementation of case-based reasoning
approach of machine learning.
 (EBMT) approach was proposed by Makoto Nagao in
1984.[3][4]

(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

He buys a book on international politics

Matches

He buys a notebook.
Kare wa nōto o kau.

I read a book on international politics.


Watashi wa kokusai seiji nitsuite kakareta hon o yomu.

Result

Kare wa kokusai seiji nitsuite kakareta hon o kau.


Statistical machine translation (SMT)

 Statistical machine translation (SMT)


is a machine translation paradigm
where translations are generated on
the basis of statistical models whose
parameters are derived from the
analysis of bilingual text corpora.
How to Build an SMT
169
System
 Start with a large parallel corpus
 Consists of document pairs (document and its translation)
 Sentence alignment: in each document pair automatically
find those sentences which are translations of one another
 Results in sentence pairs (sentence and its translation)
 Word alignment: in each sentence pair automatically
annotate those words which are translations of one another
 Results in word-aligned sentence pairs
 Automatically estimate a statistical model from the word-
aligned sentence pairs
 Results in model parameters
 Given new text to translate, apply model to get most
probable translation
Sentence alignment
170

 If document De is translation of document


Df how do we find the translation for each
sentence?
 The n-th sentence in De is not necessarily
the translation of the n-th sentence in
document Df
 In addition to 1:1 alignments, there are
also 1:0, 0:1, 1:n, and n:1 alignments
 In European Parliament proceedings,
approximately 90% of the sentence
alignments are 1:1
Modified from Dorr, Monz
Sentence alignment
171

 There are several sentence alignment algorithms:


 Align (Gale & Church): Aligns sentences based on their
character length (shorter sentences tend to have
shorter translations then longer sentences). Works well
 Char-align: (Church): Aligns based on shared character
sequences. Works fine for similar languages or technical
domains
 K-Vec (Fung & Church): Induces a translation lexicon
from the parallel texts based on the distribution of
foreign-English word pairs
 Cognates (Melamed): Use positions of cognates
(including punctuation)
 Length + Lexicon (Moore): Two passes, high accuracy,
freely available

Modified from Dorr, Monz


Corpus
17
2
 Corpus:
 corpus, plural corpora A collection of
linguistic data, either compiled as written texts
or as a transcription of recorded speech.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Hybrid Machine Translation (HMT)
17
3
 Hybrid machine translation (HMT)
leverages the strengths of statistical and
rule-based translation methodologies.[5]
 Several MT companies (Asia Online,
LinguaSys, and Systran) are claiming to
have a hybrid approach using both rules
and statistics.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Machine Translation Applications
17
4  LinguaSys (http://www.linguasys.net/)
 provides highly customized hybrid machine translation that can go from any
language to any language. [Video: http://www.youtube.com/watch?v=lcSYwNP4CQ4]
 Asia Online [http://www.asiaonline.net/translation.aspx]
 provides a custom machine translation engine building capability that they claim
gives near-human quality compared to the "gist" based quality of free online
engines. Asia Online also provides tools to edit and create custom machine
translation engines with their Language Studio suite of products.
 Hindi to Punjabi Machine Translation System[3],
 provides machine translation using a direct approach. It translates Hindi into
Punjabi. It also features writing e-mail in the Hindi language and sending the
same in Punjabi to the recipient.
 IdiomaX,
 which powers online translation services at idiomax.com
 Toggletext
 uses a transfer-based system (known as Kataku) to translate between English and
Indonesian.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
LinguaSys
17
5

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
17
6

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Machine Translation Applications (Cont..)
17
7
 Arabic machine translation
 in multilingual framework.
 Worldlingo
 provides machine translation using both statistical based TE's and rule based
TE's. Most recognizable as the MT partner in Microsoft Windows and
Microsoft Mac Office.
 Power Translator
 SDL ETS and Language Weaver
 which power FreeTranslation.com (website)
 SYSTRAN,
 which powers Yahoo! Babel Fish
 Promt,
 which powers online translation services at Voila.fr and Orange.fr
 AppTek,
 which released a hybrid MT system in 2009.[4]
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Machine Translation Applications (Cont..)
17
8
 Anusaaraka
 A free open source machine translation from English to Hindi based on
Panini grammar and uses state of the art NLP tools. Can be used online
and downloaded from
 Apertium,
 a free and open source machine translation platform (WinXLator gives
this a Windows GUI, but it is likely to be in violation of the Apertium GPL
license)
 Google Translator
 A free online translator from Google. [URL: translate.google.com]
 Other translation software, most of them running under
Microsoft Windows, includes:
 Translation memory tools, such as SDL Trados, Wordfast, Deja Vu,
Swordfish, and
 localization tools, such and Alchemy CATALYST and Multilizer.
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
17
9

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Recent Research
18
0
 Presently a large amount of research is
done into example-based machine
translation and statistical machine
translation

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Advantages of Machine Translations
18
1
 Machine translations work at a faster rate than human translations.
 Another advantage of machine translation is that it is comparatively cheaper. It is
one time cost -the cost of the tool and its installation.
 When time is a crucial factor, machine translation can save the day. You don't have to
spend hours poring over dictionaries to translate the words. Instead, the software can
translate the content quickly and provide a quality output to the user in no time at
all.
 The next benefit of machine translation is that it is comparatively cheap. Initially, it
might look like a unnecessary investment but in the long run it is a very small cost
considering the return it provides. This is because if you use the expertise of a
professional translator, he will charge you on a per page basis which is going to be
extremely costly while this will be cheap.
 Confidentiality is another matter which makes machine translation favorable. Giving
sensitive data to a translator might be risky while with machine translation your
information is protected.
 A machine translator usually translates text which is in any language so there is no
such major concern while a professional translator specializes in one particular field.

[http://www.thelanguagetranslation.com/machine-translation.html]

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Drawback of MT
18
2
 Accuracy is not offered by the machine translation on a
consistent basis. You can get the gist of the draft or
documents but machine translation only does word to
word translation without comprehending the information
which might have to be corrected manually later on.
 Systematic and formal rules are followed by machine
translation so it cannot concentrate on a context and solve
ambiguity and neither makes use of experience or mental
outlook like a human translator can.

 [http://www.thelanguagetranslation.com/machine-translation.html]

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Types of Machine
18
Translation
3
 Monolingual
 Bilingual
 Multilingual

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Monolingual Machine Translation
18
4
 The translation of natural language text of
the source language to the target text in
the same language is called Monolingual
Machine Translation.

 Source Text (English)……..Computer…………> Target Text


(English)
 Source Text (Urdu)……..Computer…………> Target Text
(Urdu)
 Source Text (Pashto)……..Computer…………> Target Text
(Pashto)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Bilingual Machine
18
Translation
5
 The translation of natural language text
written in one natural language to the
target text in the other language is called
bilingual Machine Translation.

 Source Text (English)……..Computer…………> Target Text


(Pashto)
 Source Text (Urdu)……..Computer…………> Target Text
(Chines)
 Source Text (Pashto)……..Computer…………> Target Text
(Hindko)
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Multilingual Machine
18
Translation
6
 The translation of natural language text
written in one language to the target text
in more than two languages is called
Multilingual Machine Translation.

 Source Text (English)……..Computer…………> Target Text (Urdu,


Pashto)
 Source Text (Urdu)……..Computer…………> Target Text (Hindko,
Japanies, Turkish)

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Translation Unit
18
7
 In the field of translation, a translation
unit is a segment of a text which the
translator treats as a single cognitive unit
for the purposes of establishing an
equivalence.
 The translation unit may be a
 Singleword, or it may be
 Sentence
 Discourse

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.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Word-For-Word Translation
18
9
 Transferring the meaning of each individual
word in a text to another, equivalent word in
the target language.
 Sometimes called 'Literal Translation'.
 While this is clearly appropriate for dictionaries,
it can produce very complex passages of text.

 [Translation Theory,
http://www.translatum.gr/etexts/translation-theory.htm#UnitOfTranslation,
Retrieved date: 09-Jan,2011]

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Word-For-Word Translation (Cont..)
19
0
 Problems/limitations
 Words order in source and target language
 SOV vs SVO
 I ate the meal [English]

 Ma dody wakhwara [Pashto]


 Sometimes, no matching word in target
language
 No (1-1) correspondence between the words of
source language and target language
 Poly-semantic words
Natural Language Processing (NLP) by Rahman Ali, Lect:
December 2, 2024
QACC, UOP
Sentence-by-sentence Translation
19
1
 A sentence in the source language is
taken as a unit of translation and
translated to the corresponding target
language.
 Most MT work focuses on sentence
translation.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Sentence-by-sentence Translation (Cont..)
19
2
 What does sentence translation ignore?
 Discourse properties/structure
 Inter-sentence co-reference.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Problems in Sentence-based MT
<doc>
<sentence>
William Shakespeare was an English poet and
playwright widely regarded as the greatest
writer of the English language, as well as one
of the greatest in Western literature, and the
world's pre-eminent dramatist.
<sentence>

He wrote about thirty-eight plays and 154


sonnets (poems), as well as a variety of other
<sentence>
poems.
. . . What is the referent of “He”?

</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

 A natural language expression used to perform


reference is called a referring expression and the
entity that is referred to is called the referent.
 Referring expressions are words or phrases, the
semantic interpretation of which is a discourse entity (also
called referent)
 Example:
 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…

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.

 (From Wikipedia, the free encyclopedia)

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

[boss] 2 and tell [her] 2 what had happened.

 (From Wikipedia, the free encyclopedia)

203
Types of Endophora
 1) Cataphora:
 The type of endophora in which the referring expression occur
before the referent are termed as cataphora.

 OR The type of endophora in which the pronouns link forward to a


referent (nouns) in the text that follows.
 For example:
 When [she] 1 saw the snake, [Harry] 1 cried.
 The elevator opened for [him] 1 on the 14th flour, and [Ali] 1 stepped out
quickly.
 2) Anaphora:
 The type of endophora in which the referent occurs before the
referring expression are termed as anaphora.

 OR The type of endophora in which the pronouns link backward to


a referent (nouns) in the text.
 For example:

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.

 For Example: Correlate/


 1)John helped Mary.
Referent/
 2) He was kind.
Antecedent
Referring Element/
Anaphor/
Anaphoric Device
(AD)
205
Anaphoric and Cataphoric Devices
 The referring elements (pronouns) in anaphoric text that
refer to their corresponding referent ( nouns) backward are
called anaphoric devices. Also, called anaphor.
 For example:
 Bell is a powerful player but unfortunately he will not take part in the
trophy due to injury.
Anaphoric Device
 The referring elements (pronouns) that refer to their
corresponding referent (nouns) forward in cataphoric text
are called cataphoric devices. Also, called
cataphor.
 For example:
 As her father went abroad, Nighat took control of the organization by
herself. Cataphoric Device

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:

1) John helped Mary.


2) He was kind.

 After anaphora resolution:

1) John helped Mary.


2) John was kind.

210
Agenda
21
1
 Natural Language Understanding (NLU)
 Ellipsis Definition
 Examples of Ellipsis
 Origin of the Word Ellipsis

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Ellipsis
21
2
 Definition:
 The omission of a portion, of a phrase or a
sentence is called Ellipsis (Rav, L., F.).
 Example:

He is rich, but his brother is not ᶲ.

Bob ᶲ and Tom ate cheese.

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Examples of Ellipsis
21
3
 George bought a huge box of chocolates but
few Ǿ were left by the end of the day.
Chocolates
 I have never been to Karachi but my father
has Ǿ , and he says it was wonderful.

Been to
Karachi

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Examples of Ellipsis
21
4
(1)
‫د ځانمرګې بريدونو له السه ډير خلک ټپيان شول او‬
‫پکښے ووژل شول‬ ‫يو څو‬-
Shows that here a noun is missing which is the
possible referring expression for the antecedent
[People]

‫د ځانمرګې بريدونو له السه ډير خلک ټپيان شول او‬


‫يو څو خلک پکښے ووژل شول‬-

Natural Language Processing (NLP) by Rahman Ali, Lect:


December 2, 2024
QACC, UOP
Examples of Ellipsis
21
5

-Ǿ ‫ډوډۍ به ورپسې کله ما يوړه کله به نورينې‬


]Mirza Jahanzeb Yar, ”Gulmeena", Page-45]

Denotes the missing verb


phrased [‫]يوړه‬.

‫ ډوډۍ به ورپسې کله ما يوړه کله به نورينې يوړه‬-

.
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

Learning by instruction occurs when one


male imitates the song of another.
Learn by Analogy
 Analogical learning is the process of
learning a new concept or solution
through the use of similar known
concepts or solutions. We use this type
of learning when solving problems on an
exam where previously learned
examples serve as a guide or when
make frequent use of analogical
learning.
Inductive Learning
 Inductive Learning is the process of
making generalized decisions after
observing, or witnessing, repeated specific
instances of something. For example
 This cat is black. That cat is black A third
cat is black. Therefore all cats are black.
 This marble from the bag is black. That
marble from the bag is black. A third
marble from the bag is black. Therefore all
the marbles in the bag black.
Learning by Deduction
 In the process of deduction, you begin with
some statements, called 'premises', that
are assumed to be true, you then
determine what else would have to be true
if the premises are true.
 All men are mortal. Joe is a man. Therefore
Joe is mortal. If the first two statements are
true, then the conclusion must be true. 2
 Bachelor's are unmarried men. Bill is
unmarried. Therefore, Bill is a bachelor. 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy