Unit v Expert Systems Notes
Unit v Expert Systems Notes
1. **Tokenization**: Breaking text into smaller units such as words, phrases, symbols, or other
meaningful elements (tokens).
3. **Stopword Removal**: Filtering out common words (stopwords) that carry little or no
meaning, such as "and", "the", "is", etc.
4. **Stemming and Lemmatization**: reducing words to their base or root form. Stemming
involves chopping off suffixes to produce the root form (e.g., "running" becomes "run"), while
lemmatization involves reducing words to their dictionary form (e.g., "better" becomes "good").
6. **Named Entity Recognition (NER)**: Identifying and categorizing named entities such as
names of people, organizations, locations, dates, etc. within the text.
8. **Word Sense Disambiguation**: Determining the correct meaning of a word with multiple
meanings based on the context in which it appears.
9. **Semantic Analysis**: Extracting the meaning of text beyond its literal interpretation,
which may involve tasks such as sentiment analysis, topic modeling, or understanding the intent
of the text.
10. **Syntactic Analysis**: Analyzing the structure of sentences using formal grammar rules to
understand the relationships between words.
12. **Text Classification**: Assigning predefined categories or labels to text documents based
on their content, which may involve tasks such as sentiment analysis, spam detection, or topic
categorization.
13. **Machine Translation**: Translating text from one language to another using statistical
models or neural networks.
14. **Text Generation**: Generating human-like text based on given input or prompts, which
may involve techniques such as language modeling or sequence-to-sequence models.
These steps often overlap and are interconnected, and many NLP tasks may involve multiple of
these steps in combination to achieve a desired outcome. Additionally, the advancement of deep
learning techniques, particularly with transformer models like BERT and GPT, has led to
significant improvements in various NLP tasks.
Syntactic Analysis :
Linear sequences of words are 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 of how
words may be combined. For example, an English syntactic analyzer would reject the sentence
"Boy the go the to store."
Semantic Analysis :
The structures created by the syntactic analyzer are assigned meanings. In other words, a
mapping is made between the syntactic structures and objects in the task domain. Structures for
which no such mapping is possible may be rejected. For example, in most universes, the sentence
Colorless green ideas sleep furiously" [Chomsky. 1957] would be rejected as semantically
anomolous.
Discourse Integration :
The meaning of an individual sentence may depend on the sentences that precede l and may
influence the meanings of the sentences that follow it. For example, the word "it" in the "John
wanted it," depends on the prior discourse context, while the word "John" may influence
meaning of later sentences (such as, "He always had.") sentence,
Pragmatic Analysis :
The structure representing what was said is reinterpreted to determine what was actually meant.
For example, the sentence "Do you know what time it is?" should be interpreted as a Tequest to
be told the time.
Boundaries between these five phases are often very fuzzy. The phases are sometimes performed
in sequence and they are performed all at once.
2. Explain how syntactic analysis is performed in Natural Language Processing and
demonstrate the generation of parse tree by the syntax analyser.
Syntactic Analysis :
Syntactic analysis must exploit the results of morphological analysis to build a structural
description of the sentence. The goal of this process, called parsing, is to convert the flat list of
words that forms the sentence into a structure that defines the units that are represented by that
fiat list. For our example sentence, the result of parsing is shown in Fig. 15.2. The details of this
representation are not particularly significant; we describe alternative versions of them in Section
15.2. What is important here is that a flat sentence has been converted into a hierarchical
structure and that that structure has been designed to correspond to sentence units (such as noun
phrases) that will correspond to meaning units when semantic analysis is performed. One useful
thing we have done here, although not all syntactic systems do, is create a set of entities we call
reference markers. They are shown in parentheses in the parse tree. Each one corresponds to
some entity that has been mentioned in the sentence. These reference markers are useful since
they provide a place to accumulate information about the entities as we get it.
Syntactic processing is the step in which a flat input sentence is converted into a hierarchical
structure that corresponds to the units of meaning in the sentence. This process is called parsing.
Although there are natural language understanding systems that skip this step (for example, see
Section 15.3.3), it plays an important role in many natural language understanding systems for
two reasons:
• Semantic processing must operate on sentence constituents. If there is no syntactic parsing step.
Then the semantics system must decide on its own constituents. If parsing is done, on the other
hand, it constrains the number of constituents that semantics can consider. Syntactic parsing is
computationally less expensive than is semantic processing (which may require substantial
inference). Thus it can play a significant role in reducing overall system complexity.
• Although it is often possible to extract the meaning of a sentence without using grammatical
facts, it is not always possibie to do so.
Parse tree for the given sentence : “I want to print Bill’s .init file.”
3. Demonstrate the working of semantic analyser in Natural Language Processing.
Semantic Analysis :
Producing a syntactic parse of a sentence is only the first step toward understanding it.
We must still produce a representation of the meaning of the sentence. Because understanding is
a mapping proceSS, We must first define the language into which we are trying to map. There is
no single, definitive language in which all sentence meanings can be described. All of the
knowledge representation systems that were described in the literature are candidates, and having
selected one or more of them, we still need to define the vocabulary (i.e., the predicates, frames,
or whatever) that will be used on top of the structure. In the rest of this chapter, We call the final
meaning representation language, including both the representational framework and the specific
meaning vocabulary, the target language. The choice of a target language for any particular
natural language understanding program must depend on what is to be done with the meanings
once they are constructed.
Semantic analysis must do two important things:
must map individual words into appropriate objects in the knowledge base or database.
must create the correct structures to correspond to the way the meanings of the individual
words combine with each other.
There are two broad families of target languages that are used in NL Systems, depending on
the role that the natural language system is playing in a larger system (if any).
When natural language is being considered as a phenomenon on its own, as, for example,
when one builds a program whose goal is to read text and then answer questions about it, a target
language can be designed specifically to support language processing. In this case, one typically
looks for primitives that correspond to distinctions that are usually made in language. Of course,
selecting the right set of primitives is not easy. conceptual dependency and CYC.
When natural language is being used as an interface language to another program (such
as a database query system or an expert system), then the target language must be a legal input to
that other program.
The main purpose of semantic processing is the creation of a target language
representation of a sentence’s meaning.Semantic processing also imposes constraints on the
representations that can be constructed.
The various approaches for semantic processing include :
Lexical Processing
Sentence-level Processing
Semantic Grammars
Case Grammers
Conceptual Parsing
The following is the example for how semantic analysis is performed for the sentence “I
want to print Bill’s .init file.”
Expert System Shells
An Expert system shell is a software development environment. It contains the basic components
of expert systems. A shell is associated with a prescribed method for building applications by
configuring and instantiating these components.
Shell components and description
The generic components of a shell : the knowledge acquisition, the knowledge Base, the
reasoning, the explanation and the user interface are shown below. The knowledge base and
reasoning engine are the core components.
Explanation
Most expert systems have explanation facilities that allow the user to ask questions - why and
how it reached some conclusion.
The questions are answered by referring to the system goals, the rules being used, and existing
problem solving. The rules typically reflect empirical, or "compiled" knowledge. They are codes
of an expert's rules of thumb, not the expert's deeper understanding.
Example :
Dialog with an expert system designed to give advice on car problems.
System Does the car start ?
User No.
System Does the engine turn over ?
User Yes.
System Do you smell gas ?
User Yes
System Recommendation - Wait 5 minutes and try again.
User Why ?
System I used the rule:
If not start, and engine_turn_over, and smell_gas
Then recommendation is 'Wait 5 minutes and try again'
User
Note : The rule gives the correct advice for a flooded car, and knows the questions to be ask to
determine if the car is flooded, but it does not contain the knowledge of what a flooded car is and
why waiting will help.
Types of Explanation
There are four types of explanations commonly used in expert systems.
Knowledge Publishing
This is relatively new, but also potentially explosive area. Here the primary function of the
Expert system is to deliver knowledge that is relevant to the user's problem. The two most widely
known Expert systems are : one, an advisor on appropriate grammatical usage in a text; and the
other, is a tax advisor on tax strategy, tactics, and individual tax policy.
Here Expert system does analysis of real-time data from physical devices, looking for anomalies,
predicting trends, controlling optimality and failure correction. Examples of real-time systems
that actively monitor processes are found in the steel making and oil refining industries.
10b) Write notes on expert systems MYCIN, DART and XCON and how it works?
Explain.
MYCIN------4M
DART--------3M
XCON-------3M
Expert systems are computer programs that utilize knowledge and reasoning techniques to solve
complex problems in specific domains. They are designed to emulate the decision-making
capabilities of human experts. Here are simplified explanations of three well-known expert
systems: MYCIN, DART, and XCON.
1. MYCIN:
MYCIN is an expert system developed in the 1970s to assist doctors in diagnosing and treating
bacterial infections. It uses a rule-based approach and a knowledge base of medical expertise.
Here's how MYCIN works:
- Knowledge Base: MYCIN contains a large knowledge base that includes information
about symptoms, diseases, treatments, and associated rules. These rules are based on the
expertise of human doctors and specialists.
- Inference Engine: The inference engine in MYCIN applies the rules from the knowledge base
to the patient's symptoms and medical history. It evaluates the rules to determine the probability
of various diagnoses and suggests appropriate treatments.
- Consultation: The user interacts with MYCIN by providing information about the
patient's symptoms and medical data. MYCIN asks questions to gather additional details
and refines its diagnosis based on the responses.
- Reasoning and Recommendations: MYCIN uses backward chaining to reason from the
patient's symptoms to potential diseases. It assigns a probability to each possible diagnosis
and recommends treatments based on these probabilities.
2. DART:
DART (Diagnostic and Reporting Tool) is an expert system developed for diagnosing and
troubleshooting technical issues in complex systems, such as computer networks. It employs a
case-based reasoning approach. Here's a simplified overview of DART's functioning:
- Case Library: DART has a case library that stores previously solved cases. Each case
contains information about the symptoms, the diagnosed problem, and the solutions
applied. The case library serves as a repository of knowledge and experiences.
- Diagnosis: When a new problem is presented, DART compares the symptoms with those
in the case library to find the most similar cases. It retrieves the diagnosis and solution
from the closest matching cases and uses them as a starting point for the current problem.
- Adaptation: DART adapts the solution from the retrieved case to the current problem by
considering the differences in symptoms and the context. It applies problem-solving
techniques to modify and refine the solution based on the specific situation.
- Reporting: DART provides a report that includes the diagnosed problem, the adapted
solution, and any additional recommendations or suggestions for the user.
3. XCON:
XCON (Expert Configurer) is an expert system developed by Digital Equipment
Corporation for configuring computer systems. It uses a rule-based approach and is
designed to assist sales representatives in selecting the appropriate components for a
customer's specific requirements. Here's a simplified explanation of XCON's functioning:
- Configuration Process: The sales representative interacts with XCON, providing the
customer's requirements and constraints. XCON evaluates the rules in the knowledge base
to identify the compatible components that satisfy the customer's needs.
- Reasoning and Recommendations: XCON applies forward chaining to infer the optimal
configuration based on the customer's requirements and the available components. It suggests the
most suitable hardware components and provides justification for the recommendations.
CLIPS :
CLIPS, which stands for "C Language Integrated Production System," is a widely used expert
system development tool. It provides a complete environment for building rule-based expert
systems. Here are some key features of CLIPS:
4. **Integration**: CLIPS can be integrated into larger software systems through its C language
API. This allows developers to embed CLIPS functionality into existing applications or build
custom interfaces for interacting with expert systems.
5. **Extensibility**: CLIPS is highly extensible, allowing developers to add custom functions,
data types, and modules to tailor the system to specific requirements. This flexibility enables the
integration of external libraries and tools into CLIPS-based applications.
7. **Community Support**: CLIPS has a dedicated user community that provides support,
documentation, and resources for developers working with the tool. This community-driven
approach ensures ongoing development and improvement of the CLIPS ecosystem.
Overall, CLIPS is a powerful and versatile tool for building expert systems, particularly in
domains where rule-based reasoning is prevalent. Its combination of expressive rule language,
inference engine, and extensibility makes it suitable for a wide range of applications, from
diagnostic systems to decision support tools.
JESS :
JESS, which stands for "Java Expert System Shell," is another popular expert system tool,
similar to CLIPS but designed to run on the Java platform. Here are some key features of JESS:
1. **Java Integration**: JESS is written in Java and seamlessly integrates with Java-based
applications. This integration allows developers to leverage the power of JESS's expert system
capabilities within their Java projects, making it easier to incorporate rule-based reasoning into
larger software systems.
2. **Rule-Based Language**: Like CLIPS, JESS uses a rule-based language for expressing
knowledge and making deductions. The syntax of the JESS language is similar to CLIPS,
making it familiar to developers who have experience with CLIPS or other rule-based systems.
5. **Java API**: JESS provides a Java API that allows developers to interact with the expert
system engine programmatically. This API enables developers to create custom user interfaces,
integrate JESS with other Java libraries and tools, and control the behavior of the expert system
dynamically.
6. **Cross-Platform**: Being Java-based, JESS is cross-platform and can run on any platform
that supports Java, including Windows, macOS, and various Unix-like operating systems. This
portability ensures that JESS-based applications can be deployed across different environments
with ease.
7. **Community Support**: JESS benefits from an active user community that provides
documentation, tutorials, and support for developers working with the tool. This community-
driven support ecosystem helps developers overcome challenges and learn best practices for
building expert systems with JESS.
Overall, JESS is a versatile tool for building expert systems on the Java platform. Its Java
integration, rule-based language, inference engine, and extensibility make it suitable for a wide
range of applications, from decision support systems to intelligent agents in Java-based
applications.