SlideShare a Scribd company logo
unit -3 part 1.ppt
Understanding Language Syntax
and Structure
 For any language, syntax and structure usually go hand
in hand, where a set of specific rules, conventions, and
principles govern the way words are combined into
phrases; phrases get combines into clauses; and
clauses get combined into sentences.
 constituents include words, phrases, clauses, and
sentences.
Syntactic processing
 “The brown fox is quick and he is jumping over the
lazy dog”,
A bunch of unordered words don’t convey much information
Types of Parsing techniques
 Typical parsing techniques for understanding text
syntax are mentioned below.
 Parts of Speech (POS) Tagging
 Shallow Parsing or Chunking
 Constituency Parsing
 Dependency Parsing
1. PoS tagging
sentence → clauses → phrases → words
Tagging Parts of Speech
 N(oun): This usually denotes words that depict some object or
entity, which may be living or nonliving. Some examples would
be fox , dog , book , and so on. The POS tag symbol for nouns
is N.
 V(erb): Verbs are words that are used to describe certain actions,
states, or occurrences. There are a wide variety of further
subcategories, such as auxiliary, reflexive, and transitive verbs
(and many more). Some typical examples of verbs would be
running , jumping , read , and write . The POS tag symbol for
verbs is V.
 Adj(ective): Adjectives are words used to describe or qualify
other words, typically nouns and noun phrases. The phrase
beautiful flower has the noun (N) flower which is described or
qualified using the adjective (ADJ) beautiful . The POS tag
symbol for adjectives is ADJ .
 Adv(erb): Adverbs usually act as modifiers for other words
including nouns, adjectives, verbs, or other adverbs. The
phrase very beautiful flower has the adverb (ADV) very ,
which modifies the adjective (ADJ) beautiful , indicating
the degree to which the flower is beautiful. The POS tag
symbol for adverbs is ADV.
 each POS tag like the noun (N) can be further subdivided
into categories like singular nouns (NN), singular proper
nouns (NNP), and plural nouns (NNS).
 The process of classifying and labeling POS tags for
words called parts of speech tagging or POS tagging .
POS tags are used to annotate words and depict their
POS, which is really helpful to perform specific
analysis, such as narrowing down upon nouns and
seeing which ones are the most prominent, word sense
disambiguation, and grammar analysis.
 both nltk and spacy which usually use the Penn
Treebank notation for POS tagging.
unit -3 part 1.ppt
2. Shallow Parsing or Chunking
 Based on the hierarchy we depicted earlier, groups of words make up phrases.
There are five major categories of phrases:
 Noun phrase (NP): These are phrases where a noun acts as the head word.
Noun phrases act as a subject or object to a verb.
 Verb phrase (VP): These phrases are lexical units that have a verb acting as the
head word. Usually, there are two forms of verb phrases. One form has the verb
components as well as other entities such as nouns, adjectives, or adverbs as
parts of the object.
 Adjective phrase (ADJP): These are phrases with an adjective as the head
word. Their main role is to describe or qualify nouns and pronouns in a
sentence, and they will be either placed before or after the noun or pronoun.
 Adverb phrase (ADVP): These phrases act like adverbs since the adverb acts as
the head word in the phrase. Adverb phrases are used as modifiers for nouns,
verbs, or adverbs themselves by providing further details that describe or
qualify them.
 Prepositional phrase (PP): These phrases usually contain a preposition as the
head word and other lexical components like nouns, pronouns, and so on.
These act like an adjective or adverb describing other words or phrases.
unit -3 part 1.ppt
conll2000 corpus for training our shallow parser model. This corpus is available in nltk with chunk
annotations and we will be using around 10K records for training our model.
 10900 48
(S
Chancellor/NNP
(PP of/IN)
(NP the/DT Exchequer/NNP)
(NP Nigel/NNP Lawson/NNP)
(NP 's/POS restated/VBN commitment/NN)
(PP to/TO)
(NP a/DT firm/NN monetary/JJ policy/NN)
(VP has/VBZ helped/VBN to/TO prevent/VB)
(NP a/DT freefall/NN)
(PP in/IN)
(NP sterling/NN)
(PP over/IN)
(NP the/DT past/JJ week/NN)
./.)
Chunk tags IOB format
 [('Chancellor', 'NNP', 'O'),
('of', 'IN', 'B-PP'),
('the', 'DT', 'B-NP'),
('Exchequer', 'NNP', 'I-NP'),
('Nigel', 'NNP', 'B-NP'),
('Lawson', 'NNP', 'I-NP'),
("'s", 'POS', 'B-NP'),
('restated', 'VBN', 'I-NP'),
('commitment', 'NN', 'I-NP'),
('to', 'TO', 'B-PP'),
('a', 'DT', 'B-NP'),
('firm', 'NN', 'I-NP'),
('monetary', 'JJ', 'I-NP'),
('policy', 'NN', 'I-NP'),
('has', 'VBZ', 'B-VP'),
('helped', 'VBN', 'I-VP'),
('to', 'TO', 'I-VP'),
('prevent', 'VB', 'I-VP'),
('a', 'DT', 'B-NP'),
('freefall', 'NN', 'I-NP'),
('in', 'IN', 'B-PP'),
('sterling', 'NN', 'B-NP'),
('over', 'IN', 'B-PP'),
('the', 'DT', 'B-NP'),
('past', 'JJ', 'I-NP'),
('week', 'NN', 'I-NP'),
('.', '.', 'O')]
 The chunk tags use the IOB format. This notation
represents Inside, Outside, and Beginning. The B-
prefix before a tag indicates it is the beginning of a
chunk, and I- prefix indicates that it is inside a chunk.
The O tag indicates that the token does not belong to
any chunk.
NGramTagChunker format
 NGramTagChunker that will take in tagged
sentences as training input, get their (word, POS tag,
Chunk tag) WTC triples, and train
a BigramTagger with a UnigramTagger as the
backoff tagger.
 The UnigramTagger , BigramTagger ,
and TrigramTagger are classes that inherit from the
base class NGramTagger , which itself inherits from
the ContextTagger class , which inherits from
the SequentialBackoffTagger class .
Example
3. Constituency Parsing
 Constituent-based grammars are used to analyze and
determine the constituents of a sentence.
 phrase structure rules:
 They determine what words are used to construct the
phrases or constituents.
 They determine how we need to order these
constituents together.
 A constituency parser can be built based on such
grammars/rules, which are usually collectively
available as context-free grammar (CFG) or phrase-
structured grammar. The parser will process input
sentences according to these rules, and help in
building a parse tree.
 The generic representation of a phrase structure rule
is S → AB , which depicts that the structure S consists
of constituents A and B , and the ordering
is A followed by B .
 The phrase structure rule denotes a binary division for
a sentence or a clause as S → NP VP where S is the
sentence or clause, and it is divided into the subject,
denoted by the noun phrase (NP) and the predicate,
denoted by the verb phrase (VP).
 using nltk and the StanfordParser here to generate
parse trees.
 The Stanford parser generally uses a PCFG
(probabilistic context-free grammar) parser. A
PCFG is a context-free grammar that associates a
probability with each of its production rules. The
probability of a parse tree generated from a PCFG is
simply the production of the individual probabilities
of the productions used to generate it.
unit -3 part 1.ppt
4. Dependency Parsing
 In dependency parsing, we try to use dependency-
based grammars to analyze and infer both structure
and semantic dependencies and relationships between
tokens in a sentence.
unit -3 part 1.ppt
Dependency Tag Description
acl
clausal modifier of a noun (adnominal
clause)
acl:relcl relative clause modifier
advcl adverbial clause modifier
advmod adverbial modifier
advmod:emph emphasizing word, intensifier
advmod:lmod locative adverbial modifier
amod adjectival modifier
appos appositional modifier
aux auxiliary
aux:pass passive auxiliary
case case-marking
cc coordinating conjunction
cc:preconj preconjunct
ccomp clausal complement
clf classifier
compound compound
compound:lvc light verb construction
compound:prt phrasal verb particle
compound:redup reduplicated compounds
compound:svc serial verb compounds
conj conjunct
cop copula
csubj clausal subject
csubj:pass clausal passive subject
dep unspecified dependency
det determiner
det:numgov
pronominal quantifier governing the case
of the noun
 The dependency tag det is pretty intuitive — it denotes the
determiner relationship between a nominal head and the
determiner. Usually, the word with POS tag DET will also have
the det dependency tag relation. Examples include fox →
the and dog → the.
 The dependency tag amod stands for adjectival modifier and
stands for any adjective that modifies the meaning of a noun.
Examples include fox → brown and dog → lazy.
 The dependency tag nsubj stands for an entity that acts as a
subject or agent in a clause. Examples include is →
fox and jumping → he.
 The dependencies cc and conj have more to do with linkages
related to words connected by coordinating conjunctions .
Examples include is → and and is → jumping.
 The dependency tag aux indicates the auxiliary or secondary
verb in the clause. Example: jumping → is.
 The dependency tag acomp stands for adjective complement
and acts as the complement or object to a verb in the sentence.
Example: is → quick
 The dependency tag prep denotes a prepositional modifier,
which usually modifies the meaning of a noun, verb, adjective, or
preposition. Usually, this representation is used for prepositions
having a noun or noun phrase complement. Example: jumping
→ over.
 The dependency tag pobj is used to denote the object of a
preposition . This is usually the head of a noun phrase following
a preposition in the sentence. Example: over → dog.
unit -3 part 1.ppt
solve
 “I prefer the morning flight through Denver.”

More Related Content

Similar to unit -3 part 1.ppt (20)

PPTX
Formal Grammars of English
Luciano Sclovsky
 
PPT
slp05.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnmmmmmmmmm
RAtna29
 
PPTX
6 POS SA.pptx
AnkitMishra746378
 
PPT
SLoSP-2007-1 natural language processing.ppt
NarendraChahar1
 
PPT
SLoSP-2007-1statisticalstatisticalstatistical.ppt
smartashammari
 
PDF
Natural Language Processing basics presentation
PREETHIRRA2011003040
 
PPTX
Natural language processing UNIT-II PPTS.pptx
nagasandeeepsomepall
 
PPTX
Artificial Intelligence Notes Unit 4
DigiGurukul
 
PPTX
gdhfjdhjcbdjhvjhdshbajhbvdjbklcbdsjhbvjhsdbvjjv
samjohnson7350
 
PPTX
8_POSNER_university_of Azad_Jammau_kashmir.pptx
mh187782
 
PPT
Natural Language Processing - English Grammar
shakeelAsghar6
 
PDF
Statistical Dependency Parsing in Korean: From Corpus Generation To Automatic...
Jinho Choi
 
PPTX
nlp (1).pptx
Subramanian Mani
 
PPT
Syntax.ppt
KhenAguinillo
 
PDF
PartOfSpeechTagging.pdf data analysis course
praBeeInadhikari
 
PPT
Syntax.pptMJHUHFVCVFVTFTGFGRSDEGYUHUIJUIJ
ChristineDragonLlant
 
PPT
Syntax.pptrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
afafchar93
 
PPT
Introduction to Natural Language Processing
Pranav Gupta
 
PPTX
Natural Language processing Parts of speech tagging, its classes, and how to ...
Rajnish Raj
 
PDF
Computational linguistics
shrey bhate
 
Formal Grammars of English
Luciano Sclovsky
 
slp05.pptnnnnnnnnnnnnnnnnnnnnnnnnnnnnmmmmmmmmm
RAtna29
 
6 POS SA.pptx
AnkitMishra746378
 
SLoSP-2007-1 natural language processing.ppt
NarendraChahar1
 
SLoSP-2007-1statisticalstatisticalstatistical.ppt
smartashammari
 
Natural Language Processing basics presentation
PREETHIRRA2011003040
 
Natural language processing UNIT-II PPTS.pptx
nagasandeeepsomepall
 
Artificial Intelligence Notes Unit 4
DigiGurukul
 
gdhfjdhjcbdjhvjhdshbajhbvdjbklcbdsjhbvjhsdbvjjv
samjohnson7350
 
8_POSNER_university_of Azad_Jammau_kashmir.pptx
mh187782
 
Natural Language Processing - English Grammar
shakeelAsghar6
 
Statistical Dependency Parsing in Korean: From Corpus Generation To Automatic...
Jinho Choi
 
nlp (1).pptx
Subramanian Mani
 
Syntax.ppt
KhenAguinillo
 
PartOfSpeechTagging.pdf data analysis course
praBeeInadhikari
 
Syntax.pptMJHUHFVCVFVTFTGFGRSDEGYUHUIJUIJ
ChristineDragonLlant
 
Syntax.pptrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
afafchar93
 
Introduction to Natural Language Processing
Pranav Gupta
 
Natural Language processing Parts of speech tagging, its classes, and how to ...
Rajnish Raj
 
Computational linguistics
shrey bhate
 

More from LSURYAPRAKASHREDDY (7)

PPTX
Unit 4- Testing.pptx
LSURYAPRAKASHREDDY
 
PPTX
Unit 3- Software Design.pptx
LSURYAPRAKASHREDDY
 
PPTX
Virtual Reality Technology.pptx
LSURYAPRAKASHREDDY
 
PPTX
BIG MART SALES.pptx
LSURYAPRAKASHREDDY
 
PPTX
nouns 1234 - Copy.pptx
LSURYAPRAKASHREDDY
 
PPTX
PREPOSITIONS 12.pptx
LSURYAPRAKASHREDDY
 
PPTX
BIG MART SALES PRIDICTION PROJECT.pptx
LSURYAPRAKASHREDDY
 
Unit 4- Testing.pptx
LSURYAPRAKASHREDDY
 
Unit 3- Software Design.pptx
LSURYAPRAKASHREDDY
 
Virtual Reality Technology.pptx
LSURYAPRAKASHREDDY
 
BIG MART SALES.pptx
LSURYAPRAKASHREDDY
 
nouns 1234 - Copy.pptx
LSURYAPRAKASHREDDY
 
PREPOSITIONS 12.pptx
LSURYAPRAKASHREDDY
 
BIG MART SALES PRIDICTION PROJECT.pptx
LSURYAPRAKASHREDDY
 

Recently uploaded (20)

PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
community health nursing question paper 2.pdf
Prince kumar
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 

unit -3 part 1.ppt

  • 2. Understanding Language Syntax and Structure  For any language, syntax and structure usually go hand in hand, where a set of specific rules, conventions, and principles govern the way words are combined into phrases; phrases get combines into clauses; and clauses get combined into sentences.  constituents include words, phrases, clauses, and sentences.
  • 4.  “The brown fox is quick and he is jumping over the lazy dog”, A bunch of unordered words don’t convey much information
  • 5. Types of Parsing techniques  Typical parsing techniques for understanding text syntax are mentioned below.  Parts of Speech (POS) Tagging  Shallow Parsing or Chunking  Constituency Parsing  Dependency Parsing
  • 6. 1. PoS tagging sentence → clauses → phrases → words
  • 7. Tagging Parts of Speech  N(oun): This usually denotes words that depict some object or entity, which may be living or nonliving. Some examples would be fox , dog , book , and so on. The POS tag symbol for nouns is N.  V(erb): Verbs are words that are used to describe certain actions, states, or occurrences. There are a wide variety of further subcategories, such as auxiliary, reflexive, and transitive verbs (and many more). Some typical examples of verbs would be running , jumping , read , and write . The POS tag symbol for verbs is V.  Adj(ective): Adjectives are words used to describe or qualify other words, typically nouns and noun phrases. The phrase beautiful flower has the noun (N) flower which is described or qualified using the adjective (ADJ) beautiful . The POS tag symbol for adjectives is ADJ .
  • 8.  Adv(erb): Adverbs usually act as modifiers for other words including nouns, adjectives, verbs, or other adverbs. The phrase very beautiful flower has the adverb (ADV) very , which modifies the adjective (ADJ) beautiful , indicating the degree to which the flower is beautiful. The POS tag symbol for adverbs is ADV.  each POS tag like the noun (N) can be further subdivided into categories like singular nouns (NN), singular proper nouns (NNP), and plural nouns (NNS).
  • 9.  The process of classifying and labeling POS tags for words called parts of speech tagging or POS tagging . POS tags are used to annotate words and depict their POS, which is really helpful to perform specific analysis, such as narrowing down upon nouns and seeing which ones are the most prominent, word sense disambiguation, and grammar analysis.  both nltk and spacy which usually use the Penn Treebank notation for POS tagging.
  • 11. 2. Shallow Parsing or Chunking  Based on the hierarchy we depicted earlier, groups of words make up phrases. There are five major categories of phrases:  Noun phrase (NP): These are phrases where a noun acts as the head word. Noun phrases act as a subject or object to a verb.  Verb phrase (VP): These phrases are lexical units that have a verb acting as the head word. Usually, there are two forms of verb phrases. One form has the verb components as well as other entities such as nouns, adjectives, or adverbs as parts of the object.  Adjective phrase (ADJP): These are phrases with an adjective as the head word. Their main role is to describe or qualify nouns and pronouns in a sentence, and they will be either placed before or after the noun or pronoun.  Adverb phrase (ADVP): These phrases act like adverbs since the adverb acts as the head word in the phrase. Adverb phrases are used as modifiers for nouns, verbs, or adverbs themselves by providing further details that describe or qualify them.  Prepositional phrase (PP): These phrases usually contain a preposition as the head word and other lexical components like nouns, pronouns, and so on. These act like an adjective or adverb describing other words or phrases.
  • 13. conll2000 corpus for training our shallow parser model. This corpus is available in nltk with chunk annotations and we will be using around 10K records for training our model.  10900 48 (S Chancellor/NNP (PP of/IN) (NP the/DT Exchequer/NNP) (NP Nigel/NNP Lawson/NNP) (NP 's/POS restated/VBN commitment/NN) (PP to/TO) (NP a/DT firm/NN monetary/JJ policy/NN) (VP has/VBZ helped/VBN to/TO prevent/VB) (NP a/DT freefall/NN) (PP in/IN) (NP sterling/NN) (PP over/IN) (NP the/DT past/JJ week/NN) ./.)
  • 14. Chunk tags IOB format  [('Chancellor', 'NNP', 'O'), ('of', 'IN', 'B-PP'), ('the', 'DT', 'B-NP'), ('Exchequer', 'NNP', 'I-NP'), ('Nigel', 'NNP', 'B-NP'), ('Lawson', 'NNP', 'I-NP'), ("'s", 'POS', 'B-NP'), ('restated', 'VBN', 'I-NP'), ('commitment', 'NN', 'I-NP'), ('to', 'TO', 'B-PP'), ('a', 'DT', 'B-NP'), ('firm', 'NN', 'I-NP'), ('monetary', 'JJ', 'I-NP'), ('policy', 'NN', 'I-NP'), ('has', 'VBZ', 'B-VP'), ('helped', 'VBN', 'I-VP'), ('to', 'TO', 'I-VP'), ('prevent', 'VB', 'I-VP'), ('a', 'DT', 'B-NP'), ('freefall', 'NN', 'I-NP'), ('in', 'IN', 'B-PP'), ('sterling', 'NN', 'B-NP'), ('over', 'IN', 'B-PP'), ('the', 'DT', 'B-NP'), ('past', 'JJ', 'I-NP'), ('week', 'NN', 'I-NP'), ('.', '.', 'O')]  The chunk tags use the IOB format. This notation represents Inside, Outside, and Beginning. The B- prefix before a tag indicates it is the beginning of a chunk, and I- prefix indicates that it is inside a chunk. The O tag indicates that the token does not belong to any chunk.
  • 15. NGramTagChunker format  NGramTagChunker that will take in tagged sentences as training input, get their (word, POS tag, Chunk tag) WTC triples, and train a BigramTagger with a UnigramTagger as the backoff tagger.  The UnigramTagger , BigramTagger , and TrigramTagger are classes that inherit from the base class NGramTagger , which itself inherits from the ContextTagger class , which inherits from the SequentialBackoffTagger class .
  • 17. 3. Constituency Parsing  Constituent-based grammars are used to analyze and determine the constituents of a sentence.  phrase structure rules:  They determine what words are used to construct the phrases or constituents.  They determine how we need to order these constituents together.
  • 18.  A constituency parser can be built based on such grammars/rules, which are usually collectively available as context-free grammar (CFG) or phrase- structured grammar. The parser will process input sentences according to these rules, and help in building a parse tree.
  • 19.  The generic representation of a phrase structure rule is S → AB , which depicts that the structure S consists of constituents A and B , and the ordering is A followed by B .  The phrase structure rule denotes a binary division for a sentence or a clause as S → NP VP where S is the sentence or clause, and it is divided into the subject, denoted by the noun phrase (NP) and the predicate, denoted by the verb phrase (VP).
  • 20.  using nltk and the StanfordParser here to generate parse trees.
  • 21.  The Stanford parser generally uses a PCFG (probabilistic context-free grammar) parser. A PCFG is a context-free grammar that associates a probability with each of its production rules. The probability of a parse tree generated from a PCFG is simply the production of the individual probabilities of the productions used to generate it.
  • 23. 4. Dependency Parsing  In dependency parsing, we try to use dependency- based grammars to analyze and infer both structure and semantic dependencies and relationships between tokens in a sentence.
  • 25. Dependency Tag Description acl clausal modifier of a noun (adnominal clause) acl:relcl relative clause modifier advcl adverbial clause modifier advmod adverbial modifier advmod:emph emphasizing word, intensifier advmod:lmod locative adverbial modifier amod adjectival modifier appos appositional modifier aux auxiliary aux:pass passive auxiliary case case-marking cc coordinating conjunction cc:preconj preconjunct ccomp clausal complement clf classifier compound compound compound:lvc light verb construction compound:prt phrasal verb particle compound:redup reduplicated compounds compound:svc serial verb compounds conj conjunct cop copula csubj clausal subject csubj:pass clausal passive subject dep unspecified dependency det determiner det:numgov pronominal quantifier governing the case of the noun
  • 26.  The dependency tag det is pretty intuitive — it denotes the determiner relationship between a nominal head and the determiner. Usually, the word with POS tag DET will also have the det dependency tag relation. Examples include fox → the and dog → the.  The dependency tag amod stands for adjectival modifier and stands for any adjective that modifies the meaning of a noun. Examples include fox → brown and dog → lazy.  The dependency tag nsubj stands for an entity that acts as a subject or agent in a clause. Examples include is → fox and jumping → he.  The dependencies cc and conj have more to do with linkages related to words connected by coordinating conjunctions . Examples include is → and and is → jumping.
  • 27.  The dependency tag aux indicates the auxiliary or secondary verb in the clause. Example: jumping → is.  The dependency tag acomp stands for adjective complement and acts as the complement or object to a verb in the sentence. Example: is → quick  The dependency tag prep denotes a prepositional modifier, which usually modifies the meaning of a noun, verb, adjective, or preposition. Usually, this representation is used for prepositions having a noun or noun phrase complement. Example: jumping → over.  The dependency tag pobj is used to denote the object of a preposition . This is usually the head of a noun phrase following a preposition in the sentence. Example: over → dog.
  • 29. solve  “I prefer the morning flight through Denver.”