0% found this document useful (0 votes)
21 views8 pages

NLP Assignment

Transition Network Grammars (TNGs) utilize directed graphs to represent language structures, combining finite state machines with enhancements for parsing natural languages. They include components like states and arcs, with types such as Basic Transition Networks and Augmented Transition Networks, which allow for complex sentence structures. Despite their advantages in visualization and efficiency, TNGs face limitations in complexity and expressive power, yet remain significant in computational linguistics applications like parsing and machine translation.

Uploaded by

Raghav Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

NLP Assignment

Transition Network Grammars (TNGs) utilize directed graphs to represent language structures, combining finite state machines with enhancements for parsing natural languages. They include components like states and arcs, with types such as Basic Transition Networks and Augmented Transition Networks, which allow for complex sentence structures. Despite their advantages in visualization and efficiency, TNGs face limitations in complexity and expressive power, yet remain significant in computational linguistics applications like parsing and machine translation.

Uploaded by

Raghav Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Ans- Transition network Grammars (TNGS) are a powerful tool in

computational linauistics fo representing the structure and ules of


lanauages, particulariy natural lanquaqgs Theyleveraae the comcept of
finite state machines (FSMS) with Some enhancements to model the
intricacie5 of languaae.
Buiding Blocks of TNGS:
Directed Graphs. TrGS are visualized as directed araphs. Nodes
represent different staaes in processing a sentence, and labeled arcs
connect these nodes, indicating transitions based on specific rules or
conditions.

Components.
States. These are the nodes in the qraph, Sianifying points during
sentence analysis. There's typicaly a desianated start state and one or
more firnal stateS where sUcceSsfUl parsing terminates.
Arcs: Labeled arrows connecting states. The label on an arc specifies
the type of element (UsUally the part of speech) that allows the
transition from one state to another. For instance, an arc lalbeled
"Noun' indicates a transition only possible after encoUntering a noun
Lexicon: A TNG is associated with a lexicon, a dictionary that stores
information about words and their properties relevant to the
qrammar

Types of TNGS.
Basic Transition etworks (8TrNs). These are the Sivmplest form,
resembling a collection of interconnected finite state automata. Each
FSM deas with a specific part of the qrammar, and successful parsing
involves reaching a final state by following a valid path throuah the
connected automata

Auamented Transition Networks (ATNs. ATNs are more powerful than


BTns. They incorporate features like recursion, Crucial for handling
complex sentence structures in natural lanavaaes. ATNs can also
perform actions during tranSitions, sUch as attaching semantic
infomation to phrases.
Advantaaes of TrGS.

Visual Representation: TGS offer a clear visUal representation of


qrammatical rule5, makina them easier to Understand and work with
compared to pureiy ymlbolic approaches.
Efficiency By using finite state machin@s as lbUilding lblocks, TrNGS can
be computationally efficient for parsing tasks
Generative Power: ATns, in particular, can handle complex Gentence
structures and even be used for sentence aeneration.

Limitations of TNGS.
Complexity: Building intricate qrammars with TGS can become
cUmbersome, especialily for hiahly nuanced lanauaaes
Expressive Power. While powerful, TNGs miaht not be able to capture al
the complexities of natural lanquaaes as effectiveiy as other arammar
formalisms.
Impact and Applications.
Despite limitations, TrGs, particulariy ATNs, kave played a sianificant
role in computational linquistics. Theyve been instrumental in tasks like:
Parsing: Breaking down sentences into their constituent parts and
Understanding their structure.
Natural Lanavaae Generation: Creating qrammaticaly correct and
meaningful sentences from a machine.
Machine Translation: Translating text from one lanavaae to another
while preserving meaning and structure
In concluSion, Transition Network Grammars provide a valwable
framework for representing and manipulating lanquage structure. while
they have limitations, their strenaths in visualization, efficiency, and
aenerative power make them a Sianificant tool in the field of
computational linauistics

Ans- Top-down parsina, Unlike detectives building a case from clues,


analyzes Sentences by starting with the whole picture (sentence) and
working down. Imaqine a set of qrammar rules like a blveprint for
sentences.

Start Symbot. we beain with "S," representing the entire sentence.


Matching and Rewriting; The parser Uses arammar rules to rewrite s
into Smaller components like phrases and words. It matches the curent
Symbol (e a, S) with the left-hand side of a rule (e a, S-> NP V and
rewrites it with the riaht-hand Side eq, Noun Phrase followed by Vero
Phrase)

Example:
Consider the entence "The quick brown fox jwinps" we have a aqrammar
defining how sentences (S) are built from Noun Phrases (NP and Vero
Phrases (V). By repeatedly ma tching and rewriting S based on qrammar
rules, we can break down the sentence and its parts of speech.

Benefits.
Intuitive: Alians with how we Understand lanavaae, startina with the
overall meaning
Efficient: For clear-cut arammar rules, its efficient as it directiy
taraets the expected structure.

Orawoacks:
Limited Power. Not all aravmars work with top-down parsing, especially
those with ambiquities.
Backtracking: If there are multiple matching rles, the parser miaht
need to explore different options, which can be slow.
In essence, top-down parsing offers a structured way to analyze
Sentences by starting from the top (whole sentence) and working down
to individual words, auided lby the rules of qrammar

Ans- Named Entity Recoanition (NER) kas a wide anae of applications


across various fields. Here are some key areas where itS Used:
nNews Aggreaation: rER can automaticaly identify and cateaorze news
articles based on the people, places, and oraanizations mentioned. This
helps users find news relevant to their interests and streamlines
content discovery
CUstomer Support: Busines525 can leveraae NER to analyze customer
queries and complaints. By recoqniZing entities ike product names,
deartments, or locations, companies can route inquiries to the
appropriate teams and improve cUstomer service efficiency
Research: NER iS a boon for researchers as it automates the proce55
of scanning vast amounts of text and identifying specific entities
relevant to their Studies. This Saves time and ensUres comprehensive
data analysi5.
Leaal Document Analysi6: Sifting throuah leaal documents to find crucial
detais can be tedious NER automates this lby recoaniZing names, dates,
and locations, makina leaal research and analysis faster and more
accUrate.

Content Recommendation Systems. Platforms like netflix Use NER to


identify entities in content users watch or read ThiS kelps recommend
Similar content based on the people, places, or oraanizations featured,
personaliZing the user experience.
Overall, dER plays a vital role in extracting and utilizing infomation
from text data It automates tasks, inproves efficiency and allows
for a deeper Understanding of the content being analyzed.

Q4
Ans- A Probaloilistic Context-Free Grammar (PCFG) buids on the idea of
a context-Free Grammar (cFG) but adds probalbilities to the mix.
CFG Refresher. ACEG de fines the structure of a lanauaae Using rues.
These rules Specify how to vewrite symbols (ike start symbol "s) into
Svnaller components (like phrases and words). However, a CFG doesnt tel
you how likely e0ch rule i5 to be used.
Adding Prooabilities: APCFG takes a cFG and assians a probalbility to
each rule This probability indicates kow likely it is that a specifc rUle
will be USed when rewriting a symbol. For inStance, the rule "S -> NP VPM
(sentence is a noun phrase followed loy a verb phrase) miaht kave a
hiaher probability than "s -> VP P" depending on the lanauaae
Benefits: Probabilities in PCFGS offer several advantaacs.
More Reaistic Modeling; Lanquaaes are not always perfectiy rigjd PCeGS
can captUre this lby assianing hiaher probabilities to more freqvent
phrasinas and lower probalbilities to les5 common ones, providing a more
realistic model of lanavaae structuUre.
Oisambiauation: when multiple CFG rules can be applied, the probalbilitie5
help choose the most likely one. This is crucial fo tasks like parsing
QmbiavoUS Sentences.
Statistical Leaming; PCFG parameters (probalbilities) can be estimated
by analing larae amounts of text data, allowing the qrammar to
adapt to specific lanavaaes or domains.
Example: Imaaine a Simnple qrammar for weather sentences. "s -> N
VP (sentence is noun phrase tverb phrase),"P-’ Det Noun noun
phrase is deteminer t noun), and VP-> Vero Preposition (vero
phrase is verb t preosition t noun phrase). We can as5ian probabilities
based on how common these structures are in weather forecasts. "NP
>Det NoUn' with "e t=the" and "Nounrain" miaht have a hiaher
probalbility than other noun phrase combinations.
In e55ence, PCFGS provide a more statistically Sound and flexlole way to
represent lanavaae strvcture compared to traditional CFGs By
incorporating probabilities, they offer a more realistic and powerful
tool for various Natural Lanquaae Processing (n tasks.

)Ans- Lexical and syntactic ambiauities both deal with the challenae
of multiple interpretations in languaae, but they arise from different
aspectsof lanauaae structure:.

Lexical Ambiauity
Source: Thfs ambiauity stems from the meaning of individual words. A
Single word can have mUltiple meaninas depending on the context
Example: The wod "oat" can refer to a flying mammal or a wooden
club sed in sports In the sentence "I saw a bat flyina at niaht," the
meaning is clear. But in "He Used a bat to hit the lball," the
interpretation hinaes on context

Syntactic Amoiauity:
Source: This ambiquity arises from the way words are ananaed and
Structured in a sentence. The sentece structure itsef allows for
multiple interpretations.
Example: Consider The man with the telescope saw the stars" Ooes
Mthe man with the telescope" vefer to someone who owns the telescope,
or someone holdina it while someone else see5 the stars? The sentence
Gtructure allows for both interpretations
(i) Ans- Encoding ambiauities in oaical form can be tricky because
loajcal fom typicaly aiwns to represent a Sinale, UnambiquoUs meaning
However, natural lanavaae is full of ambiauitie5, Go there are several
approaches to handle them in loaical form.

05junctive Normal Form (ONF: This approach creates multiple loaical


foms, each representing a pos5ilble interpretation.
Identify the ambiauoUs part of the sentence.
Create separate loaical forms where each fom uses a different
interpretation of the ambiauity
Connect these forms with "oR" (dsjunction) to represent all possibites
Example: The man with the telescope saw the stars"
Ambiauity: Who has the telescope?
Loaical Form k: see(man), star) &hasTelescopelmank))
Loaical Form 2: see(mantx), Star) &hasTelescopety) B withmanK),
telescope(y))
This approach captures both interpretations lbut can become
cUmbersome for complex ambiauities.

Unification-based Systems. These systems Use variables and Unification


operations to represent possible interpretations without creating
separate foms
Variables represent Unknown elements in the sentence.
Unification operations constrain the values these variables can take,
ensuring consistency across interpretations.
Example: (Geelx, star) & (has TelescopetK) Iwitk(x, 9 telescopety)
This approach is more compact but requires a more complex framework
to handle Unification.

Modal Loaic: This approach Use5 modal operators like "possiole" or


"necessary" to expres5 different interpretations within a Sinale fom.
The loqical form represents the core meaning of the sentence
Modal operators indicate the different ways this meanin can be
realized.

Example: Possible(hasTelescope(man(x) &seelmanx), star)


IPossible(withlmant*), y) & telescopey seelmanK), Star))

This approach is expres5ive but can be lessS intuitive for some


applications.
The best approach for lncoding ambiquities depends on the specific
needs of the system and the comple xity of the amoiauities being
handled Each method offers advantaaes and drawbacks, and the choice
often involves a trade-off between Simplicity, expres5ivenes5, and
computational efficiency

You might also like