Natural Language Processing Artificial Intelligence
Natural Language Processing Artificial Intelligence
Overview of Linguistics
Linguistics study of language
Levels of knowledge used in Natural language understanding
1. Phonological knowledge
-knowledge which relates sounds to the words
Phoneme smallest unit of sound
2. Morphological knowledge
- lexical knowledge related to word constructions from basic units called morphemes.
Morphemes- smallest unit of meaning
3.Syntactic knowledge
4.Semantic knowledge
5.Pragmatic knowledge
6.World knowledge
Morphological Analysis
-punctuations are seperated from words
Syntactic analysis
Eg: Boy the go the to store
Semantic analysis
Colorless green ideas sleep furiously
I dropped my dimond
Discourse Integration
John wanted it.
Pragmatic analysis
Do you know what time it is
V NP
boy | popsicle | frog
ate | kissed
the | a
|flew
NP VP
ART N VP
the N VP
the boy VP
the boy V NP
the boy ate NP
the boy ate ART N
the boy ate a N
the boy ate a popsicle.
A grammer does not gurantee the generation of meaningful sentences,
only that they are structurally correct.
The Popsicle flew a frog
Structural Representations
Sentences can be represented as a tree or graph to expose
the structure of the constituent parts.
S
NP
VP
ART
the
boy
ate
NP
ART
N
popsicle
Parser
Lexicon
Output
representation
structure
NP VP
N VP
Kathy VP
Kathy V NP
Kathy jumped NP
Kathy jumped ART N
Kathy jumped the N
Kathy jumped the house
Top down Parsing
The Lexicon
A dictionary of words, where each word contains some syntactic,
semantic and possibly some pragmatic information
Usually made up of variable length data structures such as lists or
records arranged in alphabetical order.
Transformational Grammars
Provide a mechanism to produce single representations for
sentences having the same meanings through a series
of transformations
Generative Grammers
-produce different structures for sentences having
different syntactical forms even though they may have
the same semantic content.
Consider the following sentences
S
NP
VP
V
Susan
printed
NP
NP
VP
ART
The
file
ART
the
file
V
was
PP
printed by
susan
Case Grammars
Grammer rules are written to describe syntactic rather than
semantic regularities.
(printed (agent Susan)
(object File)
Mother baked for three hours
(baked (agent Mother)
(timeperiod 3-hours)
(baked (Object Pie)
(timeperiod 3-hours)
[ _ _ D]
John died
Kill
[ _ _ D (I) A]
Bill killed John
Bill killed John with a knife.
Transition networks
Another popular method used to represent formal and
natural language structures
Based on the application of directed graphs(digraphs) and
finite state automata.
Consists of a number of nodes and labeled arcs.
Result of parsing
(S DCL
(NP (N Sample 24)))
(AUX (TENSE(PRESENT)))
(VP (V contain))
(NP (N (silicon))))
Using this structure, the semantic interpreter would produce the following
predicate clause
Pattern Recognition
Computer pattern recognition
- a process whereby computer programs are used to recognize
various forms of input stimuli such as visual or acoustic(speech)
patterns.
Pattern recognition Systems are used to identify or classify
objects on the basis of their attribute and attribute-relation
values.
Recognition is the process of establishing a close match between
some new stimulus and previously stored stimulus patterns.
Step 3
Using the selected attribute values, object or class
characterization models are learned by forming generalized
prototype descriptions, classification rules, or decision
functions.
The range of the decision function values or classification
rules is known as the decision space D.
Step 4
Recognition of familiar objects is achieved through
application of the rules learned in Step 3 by comparison and
matching of object features with the stored models.
Classification
Stimuli
Sensors
Feature
selection
Matching
Classification rules
Learning
Supervised Learning
-
Unsupervised Learning
Labled training examples are not available and little is
known beforehand regarding the object population.In
such cases, the system must be able to perceive and
extract relevant properties from the unknown objects,
find common pattern among them, and formulate
descriptions or discrimination criteria consistent with the
goals of the recognition process.
-
Expert Systems
- a recent product of AI
- a kind of knowledge based systems
- have proven to be effective in a number of problem
domains which require the kind of intelligence
possessed by a human expert.
Application Domains
Law
aerospace
Chemistry
military operations
Biology
finance
Engineering
banking
Medicine
geology
manufacturing
Definition
A set of programs designed to act as an
expert in a particular domain.
Components of an Expert
System
Explanation
Module
INPUT
I/O
Interface
OUTPUT
Editor
Inference
Engine
Knowledge
base
Learning
Module
Case
history
file
Working
memory
Knowledge Base
Contains facts and rules about some domain.
Eg:
IF : The patient has a chronic disorder,and
the age of the patient is less than 30, and
the patient shows condition A, and
test B reveals biochemistry condition C
THEN: Conclude the patient's diagnosis is autoimmunechronic-hepatitis
In PROLOG
conclude(patient,diagnosis,autoimmune-chronic-hepatitis):same(patient,disorder,chronic),
lessthan(patient,age,30)
same(patient,symptom_A,value_A),
same(patient,biochemistry,value_C).
Working Memory
match
Conflict Set
Select
execute
I/O Interface
Frame structures
Decision trees
fly
CAN
A-KIND-OF
tweety
bird
HAS PARTS
COLOR
wings
yellow
ISA
Bob
MARRIED
TO
Sandy
Professor
OWNS
House
DRIVES
Bike
Frame Architectures
Eg: for a frame based expert system - PIP system
PIP Present Illness Program
Medical knowledge in PIP is organized in frame structures.
yes
_______
red
yes
no
_______
_______
Compound-38
blue
no
yes
_______
no
Solubility test
_______
Compound-39
jigsaw puzzle
Knowledge sources
Control Information
Knowledge sources
- separate and independent sets of coded knowledge
- may contain knowledge in the form of procedures, rules, or
other schemes.
Each knowledge source may be thought of as a specialist in
some limited area needed to solve a given subset of
problems
Blackboard
- Contain current problem state and information needed by the
knowledge sources such as input data, partial solutions,
control data, alternatives, final solutions
- Knowledge sources make changes to the blackboard data.
- Communication and interaction between the knowledge
sources takes place solely through the black board.
Control Information
- May be contained within the sources, on the black board,
or possibly in a separate module.
- Monitors the changes to the blackboard and determines
what the immediate focus of attention should be in solving
the problem.
- One of the application of Blackboard System Architecture
was in the HEARSAY family of projects(speech
understanding systems)
Analogical Reasoning
Architectures
- solve new problems like humans, by finding a similar
problem solution that is known and applying the known
solution to the new problem, possibly with some
modifications.
- Will require a large knowledge base having numerous
solutions and other previously encountered situations
or episodes.
- The inference mechanism must be able to extend
known situations or solutions to fit the current problem
and verify that the extended solution is reasonable.
Neurons
Neurons are connected to one another
A simplified model of the neuron
Modeling Neurons
A simplified model of the neuron
I
N
OUTPUT
P
U
T
S
Articial neuron can be thought of as a small computing engine that takes in
input, process them and then transmit an output.
Z=f Wi Xi
i =0
X3
X2
X1
W3
W2
W1
W0
X0