Professional Documents
Culture Documents
NLP - Notebook
NLP - Notebook
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 :
: can
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 :
② 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 .
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 :
>
-
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 :
State)
- 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
-
.
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 :
EGRE :
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 :
'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 .
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
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
in
meaning from their bases
,
of the ,
Example cat + 8 -
cats dangerous
-
dangerous
.
Derivational
Morphology
Class-changing class-maintaing
adulthood
dangerous- dangerous
> adult-hoad
(a)
[N) [Adj)
< ND
Morphological Parking :
# 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
-
-
pain of
↳ Read
formed computes relation
strings -
olP should be
blu sets -