Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

NATURAL LANGUAGE PROCESSING

31/1/64
LECTURE-2 Al
-
It is an ML
technology that
gives ML
computers the
ability to
interpet and NLP

language
DL
manipulate human

It is a standard

-ng :
Worke model
for speech
- text .

Hidden Markov
Model (HMV) * check if word is verb et
,
.

· Pos
tagging
OIP
I/P
·
Speech Recognition ↓
NLU -
NLG *

understanding Generation
[Interpreter]
--
Speech Recognition

NLU CHALLENGES :

Lexical:
(Spelling-aror)
-

Synactic
:
(Structural) :Old men and women were taken to
a
safe place
Semantic :

(Meaning) The hit the


pole while
moving
-

: can

Pragmatic (Mult-Meaning) The


police coming
: :
are
.
-
NLP STEPS :

formnation
Proof
Tokenization D
Stemming
D
Lemanization
known Died
is Ex !
Ex : Dipesh an
know
knows
Ex : Die
Dead
astronaut
knowing Die

Named
Chunks
ing ↳
entity ↳ POS
tagging
*

N !
e
--
recognition
Ex : ate the fruit. killed bat
Anurag Ex : Naman a

Ex :
Whatsapp me when free Noun verb article noun
NP VP NP
&
Recognised as a

Chunk
company
eulrakle
I
relatable

STAGE/LEVELS Of NLP :

① Morphological (brak word (root words)


given
:

Ex : truth-ful-ness -broot words

② Synta
- (structural relationship blu words)
(Parse Tree) We
going house to
:

③ Semantic :
I used to check statement is
usefell or not
: Plant
Industry
④ Progmatic :
(Sentence has
multiple
.
meaning)
Ex: She was
watching the boy with a
telescope

⑤ Discourse (If :
one sentence is
affected by the last
given
sentence)
Ex :
>
-
Sentences with a connector .

urettes
multiple
AMBIGUITY IN NLP :

① Lexical :
Singer word but
different ing mean
of
She went to the O
river bank-body water

in the -financial
He
deposited the
money institution .

② Synactic : When sentence can be interputed in more

than one
way
.
like
Ex :
-
Time
flies an allow .

③ Semant &
Sentence with multiple meanings
.
&: Proffesor said on
Monday he would
give an
exam

④ Apaphoric !

A phrase or word refers to something previously mentioned, but there is more than one possibility. "Margaret
invited Susan for a visit, but she told her she had to go to work" (she = Susan; her = Margaret.)
GoURE-3
HIDDEN MARKOV MODEL :

>
-

It is a statistical model that is used to describe


the probabilistic relationship blu observations
a sequence of
and observation and hidden
a
sequence of a sequence of
State

Two parts :

Y
·
Hidden States [Generates observed Relation
data but not blu
they are
·
directly observable] both
Observation
probability
[It is measured and observed]. distribution
State
Types :

Transition Emmission
[Probability of transitioning [Obsening an
output
from
one hidden state to
given in a hidden state]
another]

a,
2
A Y
BIl ,

(Thoroughput)
② D
s

W V2 D baz A Y2
, Azi
A
Valid state
A ↳

b23 #
Y3
Al 932

931 T

W3 *
a23 ·
emmission
.
probability
STATE DIAGRAM
ALGORITHM :

(set of all possible hidden state)


and observation
Define State Space
-
space

Define the state transition


probability (transition matrix)
-

(calculate when move one to another

State)

Observation likelihood (emmission matrix)


->
Define
Tohelps to find the set
of model parameters that maximise the likelihood
of observation given the
model

- Train Model
/Bann-Welch/Forward-Backwald algo)
s used to make relationship blu Step 203

- Decode most
likely sequence of hidden layer
[Viterbi algo-dynamic programming]
-
Evaluat Model [Based on a
performance matrix]
[Accuracy ,
F1-Score ,
sensitivity and
specificity]

ADVANTAGES :

Used
for only sequential data
-
.

- It can deduce more


things due to
probability
.

DISADVANTAGE
>
-
It assumes that observations are independant
Needs
Carefull turing in older to work well
.
·
:
1102/24
ECTURE-3
REGULAR EXPRESSIONS :

It is
language
used
for specifying text search string
-

.
a

-It is in a
form of algaebic notation
for characterising
a set
of strings
(that want to search)
-pattern
we

If
requires
>
-

-urpus (Search
through method used)

Regular Expression :

& E
,
(alb)

Regular Language :

4, S23 , [alb] either a o b

EGRE :

Extracting all # email id


from a tweet ,
getting or

phone no etc
from large undesigned test content
Us :

- TextPreprocessing
even a
mini
Pattern
matching
>
-

.
Text-feature enginelling
>
-

>
-
Web-Scraping .

>
- Data extraction .

Properties of RE :

follows algaebric notation


It
>
-

always need pattern and


>
-
It
couples
Disjunction :
It
basically follow or
function to
separate
word) character from sentence .

'I
Symbol Pipe symbol
: >
-
.

Precedence , Parenthesis
disjunction
"4y/ y

A Inami
>
- Def

-Example
Finite State Automato :
(FSA) .

Edealized
>
-
machine
o
to
recognise patterns from /P from same
character set .

Accept/Reject I/P depending whether the


=>
an on

is
pattern defined in FA occurs in I/P a .
not

=>
Types [ Delesmulitisoministic
Finite Regular
Automate
Regular Expressions
.

Language

Regulen Grumman

FSA Accepter

IIP OIP

String -
FA ·
Accept/Roject

,
Example
- -
-
Sheeptalk "baat !
using
"
FSA .
-


a


a

*
1 a

I/P !
>
-

go gi 92 93 *
94

State a D !

·
go d
ql

92 8
93 93 d 94

94 & & ④
Language throughout understanding :

·
Turing Machine
A
Eliza -
LECTURE -

12/02/24
Inflectional and desirational Morphology
-
-

Morphology : -

The there
cords
study of ,
how
they are
formed and

relationship to other well in the same


language.
-

Depends of &
Morphemes Free (Lexical Grammatical
.
T
-
.
,

(Affixation ,
Vowel word) Bound

Inflectional
Morphology
added to words , then
when
they ar
any type of
don't its POS , meaning
they affect or
change its
.

Ex : Cat + 8 =
cats

law+ye lawyer .

Snown-morpheme :
noon y
Derivational Morphology
added to word, it its POS
.
When a
changes .

Ev +
:
Dangel os-
Rangerous .

(N) Cadj . )

I I
Parameters Inflectional Derivation

study of modification study of formation


of of
Defination words to
fit into
diff .
new words that
differ
glamatical contexts . either in
synactic ability or

in
meaning from their bases
,

Affixes that serve as Affixes that are


capable of
markers indicate
Morphemes grammatical and either
changing the
meaning
some
gammatical information or the
gammatical category
about word words
a .

of the ,

word Greate word


Type of a new
form of word create new .

Example cat + 8 -
cats dangerous
-
dangerous
.
Derivational
Morphology
Class-changing class-maintaing
adulthood
dangerous- dangerous
> adult-hoad
(a)
[N) [Adj)
< ND

Morphological Parking :

of finding morphemes from


It if The which
process
word is .
constructed
a
given ↑
check spelling
.

# must be able to
distinguish blu othographic &
morphological rules ,
Build Process :

· Lexicon ·
Morphotactics ·
Otrographical
Repository of of rules]
[Set Espelling rules]
Sequence of words
words lady + > =>
Ladys Y
able ness v
use
Lady + s >
- ladies I
able use ness Y

ice
list of stems ,
and
affixes

Morphotactics /

moder
of morphemer-ordering that explains which classes
other inside
of morphemes follow classes
of morphemes
a
can

word .

Autographics
-
-

It
helps to check
spelling when two or more morphemes
combine with each other .
FSA transduces [FST] :

Help to generate
IIP Same /P

-
-

tST Generator Translator b Relater


Recognise
-

pain of
↳ Read
formed computes relation
strings -

olP should be
blu sets -

pai of strings , strings , provides


Otherwise
regelt .
pain of strings

You might also like