Unit 5
Unit 5
Unit 5
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Unit - 5
Speech
Written Text
Components of NLP:
Text planning − It includes retrieving the relevant content from knowledge base.
Page | 1
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Difficulties in NLU:
NL has an extremely rich form and structure.
It is very ambiguous. There can be different levels of ambiguity –
For example, “He lifted the beetle with red cap.” − Did he use cap to lift the beetle or
he lifteda beetle that had red cap?
NLP Terminology:
Steps in NLP:
Page | 2
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Lexical Analysis − It involves identifying and analyzing the structure of words. Lexicon
of language means the collection of words and phrases in a language. Lexical analysis is
dividing the whole chunk of txt into paragraphs, sentences, and words.
Syntactic Analysis (Parsing) − It involves analysis of words in the sentence for grammar
and arranging words in a manner that shows the relationship among the words. The
sentence such as “The school goes to boy” is rejected by English syntactic analyzer.
Semantic Analysis − It draws the exact meaning or the dictionary meaning from the text.
The text is checked for meaningfulness. It is done by mapping syntactic structures and
objects in the task domain. The semantic analyzer disregards sentence such as “hot ice-
cream”.
Discourse Integration − The meaning of any sentence depends upon the meaning of the
sentence just before it. In addition, it also brings about the meaning of immediately
succeedingsentence.
Pragmatic Analysis − During this, what was said is re-interpreted on what it actually
meant. It involves deriving those aspects of language which require real world
knowledge.
There are a number of algorithms researchers have developed for syntactic analysis, but we
Page | 3
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Context-Free Grammar
Top-Down Parser
Context-Free Grammar
It is the grammar that consists rules with a single symbol on the left-hand side of the rewrite
rules.Let us create grammar to parse a sentence −
S → NP VP
NP → DET N | DET ADJ N
VP → V NP
Lexocon −
DET → a | the
ADJ → beautiful | perching
N → bird | birds | grain | grains V
→ peck | pecks | pecking
The parse tree can be created as shown −
Page | 4
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Now consider the above rewrite rules. Since V can be replaced by both, "peck" or "pecks", sentences
such as "The bird peck the grains" can be wrongly permitted. i. e. the subject-verb agreement error
isapproved as correct.
Merit − The simplest style of grammar, therefore widely used one.
Demerits −
They are not highly precise. For example, “The grains peck the bird”, is a syntactically
correct according to parser, but even if it makes no sense, parser takes it as a correct
sentence.
To bring out high precision, multiple sets of grammar need to be prepared. It may require
a completely different sets of rules for parsing singular and plural variations, passive
sentences,etc., which can lead to creation of huge set of rules that are unmanageable.
Top-Down Parser
Here, the parser starts with the S symbol and attempts to rewrite it into a sequence of terminal symbols
that matches the classes of the words in the input sentence until it consists entirely of terminalsymbols.
These are then checked with the input sentence to see if it matched. If not, the process is started
over again with a different set of rules. This is repeated until a specific rule is found which describes the
structure of the sentence.
Merit − It is simple to implement.
Demerits −
Page | 5
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Expert Systems
Expert systems (ES) are one of the prominent research domains of AI. It is introduced by the researchers
at Stanford University, Computer Science Department.
The expert systems are the computer applications developed to solve complex problems in a
particulardomain, at the level of extra-ordinary human intelligence and expertise.
High performance
Understandable
Reliable
Highly responsive
Advising
Instructing and assisting human in decision making
Demonstrating
Deriving a solution
Diagnosing
Explaining
Interpreting input
Predicting results
Justifying the conclusion
Suggesting alternative options to a problem.
They are incapable of −
Substituting human decision makers
Possessing human capabilities
Producing accurate output for inadequate knowledge base
Refining their own knowledge
Page | 6
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Inference Engine
User Interface
Let us see them one by one briefly –
Knowledge Base
Knowledge is required to exhibit intelligence. The success of any ES majorly depends upon the
collection of highly accurate and precise knowledge.
What is Knowledge?
The data is collection of facts. The information is organized as data and facts about the task
domain. Data, information, and past experience combined together are termed as knowledge.
Page | 7
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
evaluation,and guessing.
Knowledge representation:
It is the method used to organize and formalize the knowledge in the knowledge base. It is in the formof
IF-THEN-ELSE rules.
Knowledge Acquisition:
The success of any expert system majorly depends on the quality, completeness, and accuracy of
theinformation stored in the knowledge base.
The knowledge base is formed by readings from various experts, scholars, and the Knowledge
Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning, and case
analyzing skills.
He acquires information from subject expert by recording, interviewing, and observing him at work, etc.
He then categorizes and organizes the information in a meaningful way, in the form of IF-THEN- ELSE
rules, to be used by interference machine. The knowledge engineer also monitors the development
of the ES.
Inference Engine
Use of efficient procedures and rules by the Inference Engine is essential in deducting a correct,flawless
solution.
In case of knowledge-based ES, the Inference Engine acquires and manipulates the knowledge fromthe
knowledge base to arrive at a particular solution.
In case of rule based ES, it −
Applies rules repeatedly to the facts, which are obtained from earlier rule application.
Forward Chaining
Backward Chaining
Forward Chaining
It is a strategy of an expert system to answer the question, “What can happen next?”
Here, the Inference Engine follows the chain of conditions and derivations and finally deduces
Page | 8
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
theoutcome. It considers all the facts and rules, and sorts them before concluding to a solution.
This strategy is followed for working on conclusion, result, or effect. For example, prediction of sharemarket
status as an effect of changes in interest rates.
Backward Chaining
With this strategy, an expert system finds out the answer to the question, “Why this happened?”
On the basis of what has already happened, the Inference Engine tries to find out which conditions could
have happened in the past for this result. This strategy is followed for finding out cause or reason. For
example, diagnosis of blood cancer in humans.
User Interface
User interface provides interaction between user of the ES and the ES itself. It is generally Natural
Language Processing so as to be used by the user who is well-versed in the task domain. The user ofthe
ES need not be necessarily an expert in Artificial Intelligence.
It explains how the ES has arrived at a particular recommendation. The explanation may appear
in the following forms −
Its technology should be adaptable to user’s requirements; not the other way round.
Page | 9
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
No technology can offer easy and complete solution. Large systems are costly, require significant
development time, and computer resources. ESs have their limitations which include
–
Limitations of the technology
Difficult knowledge acquisition
ES are difficult to maintain
High development costs
Application Description
There are several levels of ES technologies available. Expert systems technologies include −
Page | 10
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Page | 11
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
The knowledge engineer uses sample cases to test the prototype for any
deficiencies inperformance.
End users test the prototypes of the ES.
Develop and Complete the ES
Test and ensure the interaction of the ES with all elements of its environment, including
endusers, databases, and other information systems.
Document the ES project well.
Cater for new interfaces with other information systems, as those systems evolve.
Less Production Cost − Production cost is reasonable. This makes them affordable.
Speed − They offer great speed. They reduce the amount of work an individual puts in.
Steady response − They work steadily without getting motional, tensed or fatigued.
Robotics
Robotics is a domain in artificial intelligence that deals with the study of creating intelligent andefficient
robots.
Page | 12
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Objective:
Robots are aimed at manipulating the objects by perceiving, picking, moving, modifying the physical
properties of object, destroying it, or to have an effect thereby freeing manpower from doing
repetitivefunctions without getting bored, distracted, or exhausted.
What is Robotics?
Robotics is a branch of AI, which is composed of Electrical Engineering, Mechanical Engineering, and
Computer Science for designing, construction, and application of robots.
Aspects of Robotics:
They have electrical components which power and control the machinery.
They contain some level of computer program that determines what, when and how a
robotdoes something.
AI Programs Robots
They usually operate in They operate in real physical world
computer-stimulated worlds.
Page | 13
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
They need general purpose They need special hardware with sensors
computers tooperate on. andeffectors.
Robot Locomotion:
Locomotion is the mechanism that makes a robot capable of moving in its environment. There
arevarious types of locomotions −
Legged
Wheeled
Combination of Legged and Wheeled Locomotion
Tracked slip/skid
Legged Locomotion
This type of locomotion consumes more power while demonstrating walk, jump, trot,
hop, climb up or down, etc.
It requires more number of motors to accomplish a movement. It is suited for rough as
well as smooth terrain where irregular or too smooth surface makes it consume more
power for a wheeled locomotion. It is little difficult to implement because of stability
issues.
It comes with the variety of one, two, four, and six legs. If a robot has multiple legs then
leg coordination is necessary for locomotion.
The total number of possible gaits (a periodic sequence of lift and release events for each of the totallegs) a
robot can travel depends upon the number of its legs.
If a robot has k legs, then the number of possible events N = (2k-1)!.
In case of a two-legged robot (k=2), the number of possible events is N = (2k-1)! = (2*2-1)! = 3! = 6.Hence
there are six possible different events −
Page | 14
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
In case of k=6 legs, there are 39916800 possible events. Hence the complexity of robots is
directlyproportional to the number of legs.
Wheeled Locomotion
It requires fewer number of motors to accomplish a movement. It is little easy to implement as there are
less stability issues in case of more number of wheels. It is power efficient as compared to
leggedlocomotion.
Standard wheel − Rotates around the wheel axle and around the contact
Castor wheel − Rotates around the wheel axle and the offset steering joint.
Swedish 45o and Swedish 90o wheels − Omni-wheel, rotates around the contact
point, aroundthe wheel axle, and around the rollers.
Page | 15
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Slip/Skid Locomotion
In this type, the vehicles use tracks as in a tank. The robot is steered by moving the tracks with different
speeds in the same or opposite direction. It offers stability because of large contact area of track and
ground.
Components of a Robot:
Power Supply − The robots are powered by batteries, solar power, hydraulic, or
pneumatic power sources.
Actuators − They convert energy into movement.
Pneumatic Air Muscles − They contract almost 40% when air is sucked in them.
Muscle Wires − They contract by 5% when electric current is passed through them.
Sensors − They provide knowledge of real time information on the task environment.
Robotsare equipped with vision sensors to be to compute the depth in the environment. A
tactile sensor imitates the mechanical properties of touch receptors of human fingertips.
Computer Vision:
This is a technology of AI with which the robots can see. The computer vision plays vital role in
thedomains of safety, security, health, access, and entertainment.
Computer vision automatically extracts, analyzes, and comprehends useful information from a single
image or an array of images. This process involves development of algorithms to accomplish automatic
visual comprehension.
Page | 16
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
This involves −
Power supply
Image acquisition device such as camera
A processor
A software
A display device for monitoring the system
Accessories such as camera stands, cables, and connectors
Agriculture
Autonomous vehicles
Biometrics
Character recognition
Forensics, security, and surveillance
Industrial quality inspection
Face recognition
Gesture analysis
Geoscience
Medical imagery
Pollution monitoring
Process control
Page | 17
JAIPUR ENGINEERING COLLEGE & RESEARCH
CENTRE
Department of Artificial Intelligence & Data science
IIInd yr /VIth SEM
Subject: Principles of Artificial Intelligence
Remote sensing
Robotics
Transport
Applications of Robotics:
Industries − Robots are used for handling material, cutting, welding, color coating,
drilling, polishing, etc.
Military − Autonomous robots can reach inaccessible and hazardous zones during war.
A robot named Daksh, developed by Defense Research and Development Organization
(DRDO), is in function to destroy life-threatening objects safely.
Medicine − The robots are capable of carrying out hundreds of clinical tests
simultaneously, rehabilitating permanently disabled people, and performing complex
surgeries such as brain tumors.
Exploration − The robot rock climbers used for space exploration, underwater drones
used for ocean exploration are to name a few.
Entertainment − Disney’s engineers have created hundreds of robots for movie making.
Page | 18