ai-unit4
ai-unit4
Semantic Analysis,
What is NLP?
In the beginning of the year 1990s, NLP started growing faster and
achieved good process accuracy, especially in English Grammar. In
1990 also, an electronic text introduced, which provided a good
resource for training and examining natural language programs. Other
factors may include the availability of computers with fast CPUs and
more memory. The major factor behind the advancement of natural
language processing was the Internet.
o NLP helps users to ask questions about any subject and get a
direct response within seconds.
o NLP offers exact answers to the question means it does not offer
unnecessary and unwanted information.
o NLP helps computers to communicate with humans in their
languages.
o It is very time efficient.
o Most of the companies use NLP to improve the efficiency of
documentation processes, accuracy of documentation, and
identify the information from large databases.
Disadvantages of NLP
Components of NLP
NLU NLG
Applications of NLP
There are the following applications of NLP -
1. Question Answering
Question Answering focuses on building systems that automatically
answer the questions asked by humans in a natural language.
2. Spam Detection
3. Sentiment Analysis
4. Machine Translation
Machine translation is used to translate text or speech from one
natural language to another natural language.
6. Speech Recognition
7. Chatbot
8. Information extraction
Phases of NLP
There are the following five phases of NLP:
The first phase of NLP is the Lexical Analysis. This phase scans the
source code as a stream of characters and converts it into meaningful
lexemes. It divides the whole text into paragraphs, sentences, and
words.
3. Semantic Analysis
4. Discourse Integration
5. Pragmatic Analysis
Pragmatic is the fifth and last phase of NLP. It helps you to discover
the intended effect by applying a set of rules that characterize
cooperative dialogues.
Syntactic Processing
Syntactic processing is the process of analyzing the grammatical
structure of a sentence to understand its meaning. This involves
identifying the different parts of speech in a sentence, such as nouns,
verbs, adjectives, and adverbs, and how they relate to each other in
order to give proper meaning to the sentence.
Syntactic processing, is to understand the roles played by each of the
words in the sentence, and the relationship among words and to parse
the grammatical structure of sentences to understand the proper
meaning of the sentence.
How Does Syntactic Processing Work?
To understand the working of syntactic processing, lets again start
with an example.
For example, consider the sentence “The cat sat on the mat.”
Syntactic processing would involve identifying important components
in the sentence such as “cat” as a noun, “sat” as a verb, “on” as
a preposition, and “mat” as a noun. It would also involve
understanding that “cat” is the subject of the sentence and “mat” is
the object.
Expert System
An expert system is a computer program that is designed to solve
complex problems and to provide decision-making ability like a
human expert. It performs this by extracting knowledge from its
knowledge base using the reasoning and inference rules according to
the user queries.
The expert system is a part of AI, and the first ES was developed in
the year 1970, which was the first successful approach of artificial
intelligence. It solves the most complex issue as an expert by
extracting the knowledge stored in its knowledge base. The system
helps in decision making for compsex problems using both facts and
heuristics like a human expert. It is called so because it contains the
expert knowledge of a specific domain and can solve any complex
problem of that particular domain. These systems are designed for a
specific domain, such as medicine, science, etc.
The performance of an expert system is based on the expert's
knowledge stored in its knowledge base. The more knowledge stored
in the KB, the more that system improves its performance. One of the
common examples of an ES is a suggestion of spelling errors while
typing in the Google search box.
Below is the block diagram that represents the working of an expert
system:
Note: It is important to remember that an expert system is not used to
replace the human experts; instead, it is used to assist the human in
making a complex decision. These systems do not have human
capabilities of thinking and work on the basis of the knowledge base
of the particular domain.
Below are some popular examples of the Expert System:
o DENDRAL: It was an artificial intelligence project that was
made as a chemical analysis expert system. It was used in
organic chemistry to detect unknown organic molecules with the
help of their mass spectra and knowledge base of chemistry.
o MYCIN: It was one of the earliest backward chaining expert
systems that was designed to find the bacteria causing infections
like bacteraemia and meningitis. It was also used for the
recommendation of antibiotics and the diagnosis of blood
clotting diseases.
o PXDES: It is an expert system that is used to determine the type
and level of lung cancer. To determine the disease, it takes a
picture from the upper body, which looks like the shadow. This
shadow identifies the type and degree of harm.
o CaDeT: The CaDet expert system is a diagnostic support
system that can detect cancer at early stages.
Characteristics of Expert System
o High Performance: The expert system provides high
performance for solving any type of complex problem of a
specific domain with high efficiency and accuracy.
o Understandable: It responds in a way that can be easily
understandable by the user. It can take input in human language
and provides the output in the same way.
o Reliable: It is much reliable for generating an efficient and
accurate output.
o Highly responsive: ES provides the result for any complex
query within a very short period of time.
Components of Expert System
An expert system mainly consists of three components:
o User Interface
o Inference Engine
o Knowledge Base
1. User Interface
With the help of a user interface, the expert system interacts with the
user, takes queries as an input in a readable format, and passes it to
the inference engine. After getting the response from the inference
engine, it displays the output to the user. In other words, it is an
interface that helps a non-expert user to communicate with the
expert system to find a solution.
2. Inference Engine(Rules of Engine)
o The inference engine is known as the brain of the expert system
as it is the main processing unit of the system. It applies
inference rules to the knowledge base to derive a conclusion or
deduce new information. It helps in deriving an error-free
solution of queries asked by the user.
o With the help of an inference engine, the system extracts the
knowledge from the knowledge base.
o There are two types of inference engine:
o Deterministic Inference engine: The conclusions drawn from
this type of inference engine are assumed to be true. It is based
on facts and rules.
o Probabilistic Inference engine: This type of inference engine
contains uncertainty in conclusions, and based on the
probability.
Inference engine uses the below modes to derive the solutions:
o Forward Chaining: It starts from the known facts and rules,
and applies the inference rules to add their conclusion to the
known facts.
o Backward Chaining: It is a backward reasoning method that
starts from the goal and works backward to prove the known
facts.
3. Knowledge Base
o The knowledgebase is a type of storage that stores knowledge
acquired from the different experts of the particular domain. It is
considered as big storage of knowledge. The more the
knowledge base, the more precise will be the Expert System.
o It is similar to a database that contains information and rules of a
particular domain or subject.
o One can also view the knowledge base as collections of objects
and their attributes. Such as a Lion is an object and its attributes
are it is a mammal, it is not a domestic animal, etc.
Components of Knowledge Base
o Factual Knowledge: The knowledge which is based on facts
and accepted by knowledge engineers comes under factual
knowledge.
o Heuristic Knowledge: This knowledge is based on practice, the
ability to guess, evaluation, and experiences.
Knowledge Representation: It is used to formalize the knowledge
stored in the knowledge base using the If-else rules.
Knowledge Acquisitions: It is the process of extracting, organizing,
and structuring the domain knowledge, specifying the rules to acquire
the knowledge from various experts, and store that knowledge into the
knowledge base.
Development of Expert System
Here, we will explain the working of an expert system by taking a
case study of MYCIN ES. Below are some steps to build an
MYCIN:
o Firstly, ES should be fed with expert knowledge. In the case of
MYCIN, human experts specialized in the medical field of
bacterial infection, provide information about the causes,
symptoms, and other knowledge in that domain.
o The KB of the MYCIN is updated successfully. In order to test
it, the doctor provides a new problem to it. The problem is to
identify the presence of the bacteria by inputting the details of a
patient, including the symptoms, current condition, and medical
history.
o The ES will need a questionnaire to be filled by the patient to
know the general information about the patient, such as gender,
age, etc.
o Now the system has collected all the information, so it will find
the solution for the problem by applying if-then rules using the
inference engine and using the facts stored within the KB.
o In the end, it will provide a response to the patient by using the
user interface.
Machine Learning
In the real world, we are surrounded by humans who can learn
everything from their experiences with their learning capability, and
we have computers or machines which work on our instructions. But
can a machine also learn from experiences or past data like a human
does? So here comes the role of Machine Learning.
Neural Networks
Neural Networks are computational models that mimic the complex
functions of the human brain. The neural networks consist of
interconnected nodes or neurons that process and learn from data,
enabling tasks such as pattern recognition and decision making in
machine learning.
OR
A neural network is a software solution that leverages machine
learning (ML) algorithms to ‘mimic’ the operations of a human brain.
Neural networks process data more efficiently and feature improved
pattern recognition and problem-solving capabilities when compared
to traditional computers. Neural networks are also known as artificial
neural networks (ANNs) or simulated neural networks (SNNs).
Neural networks are a subtype of machine learning and an essential
element of deep learning algorithms. Just like its functionality, the
architecture of a neural network is also based on the human brain. Its
highly interlinked structure allows it to imitate the signalling
processes of biological neurons