Professional Documents
Culture Documents
for
T.E. Computer Engg. / I. T
2. Syntactic Analysis
Linear sequence of words is transformed into structures that show how the words
relate to each other.
Some word sequences may be rejected if they violate the language’s rules for how
the words may be combined.
For example the English Syntactic Analyser would reject the sentence “Boy the go the
to store”
Syntactic Analysis exploits the results of morphological analysis to build a structural
description of a sentence.
The goal of this process called “Parsing”, is to convert the flat list of words that form
a sentence into a structure that defines the units that are represented by that flat list of
words.
The following figure shows the parse tree for the sentence ““I want to print Bill’s .init
file.”
3. Semantic Analysis
Here the structures created by syntactic analysis are assigned meaninigs.
In other words, mapping is made between the syntactic structures and the objects in
the task domain.
Semantic Analysis must do two things:
o It must map individual words into appropriate objects in the knowledge base
or database.
o It must create correct structures to correspond to the way the meanings of
individual words combine with each other.
4. Discourse Integration
Consider the sentence ““I want to print Bill’s .init file.”
In this sentence, we do not exactly know, to whom, the pronoun “I” or the proper
noun “Bill” refers to.
To pin down these references, we need a model of discourse integration from which
we can learn who the current user “I” is and who the person named “Bill” is.
Once the current reference for Bill is known we can also find the reference to actual
file whose extension is .init.
5. Pragmatic Analysis
Pragmatic Analysis is part of the process of extracting information from text.
Specifically, it's the portion that focuses on taking structures set of text and figuring
out what the actual meaning was.
Pragmatic Analysis is very important with respect to extracting the context of the
information.
Many times the context in which the sentence was said or written is very important.
So Pragmatic Analysis becomes a crucial part of NLP process.
Learning Techniques
1. Rote Learning
Rote learning is defined as the memorization of information based on repetition.
The two best examples of rote learning are the alphabet and numbers.
Slightly more complicated examples include multiplication tables and spelling words.
At the high-school level, scientific elements and their chemical numbers must be
memorized by rote.
And, many times, teachers use rote learning without even realizing they do so.
Memorization isn’t the most effective way to learn, but it’s a method many students
and teachers still use.
A common rote learning technique is preparing quickly for a test, also known as
cramming.
When rote memorization is applied as the main focus of learning, it is not considered
higher-level thought or critical thinking.
Opponents to rote memorization argue that creativity in students is stunted and
suppressed, and students do not learn how to think, analyze or solve problems.
These educators believe, instead, that a more associative or constructive learning
should be applied in the classroom. If the majority of the student’s day is spent on
repetition, the foundation for learning becomes shaky.
Rote learning is the cornerstone of higher-level thinking and should not be ignored.
Especially in today’s advanced technological world, rote memorization might be even
more important than ever
If you can easily access the information when performing a certain task, the brain is
free to make major leaps in learning.
Expert System
1. Knowledge Base
It contains domain-specific and high-quality knowledge. Knowledge is required to
exhibit intelligence. The success of any ES majorly depends upon the collection of
highly accurate and precise 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.
The knowledge base of an ES is a store of both, factual and heuristic knowledge.
1. Factual Knowledge − It is the information widely accepted by the Knowledge
Engineers and scholars in the task domain.
2. Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of
evaluation, and guessing.
Knowledge representation is the method used to organize and formalize the
knowledge in the knowledge base. It is in the form of IF-THEN-ELSE rules
The success of any expert system majorly depends on the quality, completeness, and
accuracy of the information stored in the knowledge base.
The knowledge base is formed by readings from various experts, scholars, and
the Knowledge Engineers
2. 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 from the 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.
Adds new knowledge into the knowledge base if required.
Resolves rules conflict when multiple rules are applicable to a particular case
To recommend a solution, the Inference Engine uses the following strategies −
I. Forward Chaining
II. 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 the outcome.
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 share market status as an effect of changes in interest
rates.
3. 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 of the 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 −
Natural language displayed on screen.
Verbal narrations in natural language.
Listing of rule numbers displayed on the screen.
Requirements of Efficient ES User Interface
It should help users to accomplish their goals in shortest possible way.
It should be designed to work for user’s existing or desired work practices.
Its technology should be adaptable to user’s requirements; not the other way
round.
It should make efficient use of user input.
Q. Draw and Explain architecture of Expert System with its advantages (KBCNMU December
2019 Examination)
Expert System Shell
A new expert system can be developed by adding domain knowledge to the shell. The
figure depicts generic components of expert system.
Knowledge acquisition system: It is the first and fundamental step. It helps to collect
the experts knowledge required to solve the Problems and build the knowledge base.
Knowledge Base: This component is the heart of expert systems. It stores all factual
and heuristic knowledge about the application domain. It provides with the various
representation techniques for all the data.
Inference mechanism: Inference engine is the brain of the expert system. This
component is mainly responsible for generating inference from the given knowledge
from the knowledge base and produce line of reasoning in turn the result of the user's
query.
User interface: It is the means of communication with the user. It decides the utility
of expert system.
Initially each expert system that was built, was created right from scratch. But after
several systems has been built in this way, it became clear that they had a lot in
common.
In particular, since the systems were built as asset of rules combined with an
interpreter for those representations, it was possible to separate the interpreter from
the domain specific knowledge and thus create a system that could be used to
construct a new expert system, by adding the new knowledge corresponding to the
new problem domain. Such resulting interpreters are called shells.
But with the time, expert systems needed to do something else as well. They need to
make it easy to integrate expert system with other programs.
They need to access the corporate databases, embedded with larger application
programs etc. So the most important feature of expert system shell is to provide easy
to use interface.
Q. Write a short note on Expert System Shell (KBCNMU December 2019 Examination)
Waltz’s Algorithm
There are two important steps in the use of constraints in problem solving:
Consider for example a three dimensional line drawing. The analysis process is to
determine the object described by the lines. The geometric relationships between
different types of line junctions helped to determine the object types.
In waltz’s algorithm, labels are assigned to lines of various types-say concave edges
are produced by two adjacent touching surfaces which duce a concave (less than 180
Degrees).
Conversely, convex edges produce a convexly viewed depth (greater than 180
degrees), and a boundary edge outlines a surface that obstracts other objects.
To label a concave edge, a minus sign is used.
Convex edges one labeled with a plus sign, and a right or left arrow is used to
label the boundary edges.
By restricting vertices to be the intersection of three object faces, it is possible to
reduce the number of basic vertex types to only four :
The L, The Arrow, The T, The Fork
When a three-dimensional object is viewed from all possible positions, the four
junction types, together with the valid edge labels, give rise to sixteen different
permissible junction configurations as shown in figure
Geometric constraints, together with a consistent labeling scheme, can simplify the
object identification process.
Algorithm:
1. Find the lines at the border of the scene boundary and label them. These lines can
be found by finding an outline such that no vertices are outside it. We do this first
because this labeling will impose additional constraints on the other labelings in
the figure.
2. Number the vertices of the figure to be analyzed. These numbers will correspond
to the order in which the vertices will be visited during the labeling process. To
decide on a numbering, do the following:
a. Start at any vertex on the boundary of the figure. Since boundary lines are
known, the vertices involving them are more highly constrained than are
interior ones.
b. Move from the vertex along the boundary to an adjacent unnumbered vertex
and continue until all boundary vertices have been numbered.
c. Number interior vertices by moving from a numbered vertex to some adjacent
unnumbered one. By always labeling a vertex next to one that has already
been labeled, maximum use can be made of the constraints.
3. Visit each vertex V in order and attempt to label it by doing the following:
a. Using the set of possible vertex labelings given in the list of 18 physically
possible trihedral vertices, attach to V a list of its possible labelings.
b. See whether some of these labelings can be eliminated on the basis of local
constraints. To do this, examine each vertex A that is adjacent to V and
that has already been visited. Check to see that for each proposed labeling
for V, there is a way to label the line between V and A in such a way that
at least one of the labelings listed for A is still possible. Eliminated from
V’s list any labeling for which is not the case.
c. Use the set of labelings just attached to V to contain the labels at vertices
adjacent to V. For each vertex A that was visited in the last step, do the
following:
i. Eliminated all labelings of A that are not consistent with at least
one labeling of V.
ii. If any labelings were eliminated, continue constraint propagation
by examining the vertices adjacent to A and checking for
consistency with the restricted set of labeling now attached to A
iii. Continue to propagate until there are no adjacent labeled vertices or
until there are no adjacent labeled vertices or until there is no
change made to the existing set of labeling.
A set of labelling rules which facilitates this process can be developed for different
classes of objects. The following rules will apply for many polyhedral objects.
o The arrow should be directed to mark boundaries by traversing the object in a
clockwise direction.
o Unbroken lines should have the same label assigned at both ends.
o When a fork is labelled with a + edge, it must have all three edges label as + .
o Arrow junctions which have a+ label on both bard edges must also have a +
label on the shaft.
These rules can be applied to a polygonal object as given in figure
Starting with any edge having an object face on its right, the external boundary is
labelled with the + in a clockwise direction. Interior lines are then labelled with + or -
consistent with the other labelling rules.
To see how constraint satisfaction algorithm works waltz; consider the image
drawing of a pyramid as given in below figure. At the right side of the pyramid are
all possible labelling for the four junctions A, B, C and D.
Using these labels as mutual constraints on connected junctions, permissible labels for
the whole pyramid can be determined. The constraint satisfaction procedure works
as follows.
Starting at an arbitrary junction, say A, a record of all permissible labels is made for
that junction. An adjacent junction is then chosen, say, B and labels which are
inconsistent with the line AB are then eliminated from the permissible A and B lists.
In this case, the line joining B can only be a +, - or an up arrow consequently, two of
the possible
A labelling can be eliminated and the remaining are
Choosing junction c next, we find that the BC constraints are satisfied by all of the B
and C labelling, so on reduction is possible with this step. On the other hand, the line
AC must be labelled as – or as an up left-arrow to be consistent. Therefore, an
additional label for A can be eliminated to reduce the remainder to the following.
This new restriction on a now permits the elimination of one B labelling to maintain
consistency. Thus, the permissible B labelling remaining is now
This reduction in turn, places a new restriction on BC, permitting the elimination of
one C label, since BC must now be labelled as a + only. This leaves the remaining C
labels as show in side diagram.
Moving now to junction d, we see that of the six possible D leadings, only three
satisfy the BD constraint of up or down arrow.
Continuing with the above procedure, we see that further label eliminations are not
possible since all constraints have been satisfied. This process is completed by finding
the different combinations of unique labelling that can be assigned to the figure. An
enumerations of the remaining label shows that it is possible to find only three
different labelling.
Q. Explain Waltz Algorithm with its limitations (KBCNMU December 2019 Examination)