Types of Parsers in Artificial Intelligence. Link Parser, Chart Parser, Single Transition Network, Recursive Transition Network, Augmented Transition Network, Definite Clause Grammar
Size: 1.34 MB
Language: en
Added: Apr 06, 2021
Slides: 20 pages
Slide Content
TYPES OF PARSERS By, M. Sabiha MCA 2 nd Year
What is meant by Parsing? Parsing is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar.
TYPES OF PARSERS
1. LINK PARSER Proposed by Davy Temperley and Daniel Sleator in the year 1993. Builds relations between pairs of words. Uses SVO (Subj Verb Obj) language. Rightward links are represented with + Leftward links are represented with – Optional links are contained in curly brackets {…} Undesirable links are contained in any no. of square brackets […] Multiple links are joined either by conjunction (&) or disjunction (or).
Link Grammar Rules for SVO Language Link Grammar Rules Interpretation of Rules <Determiner>: Det+; Det connected to word to its right in a sentence <Noun_Sub>: {Det-} & Sub+; Sub connected to word on its right and Det on left (optional) <Noun_Obj>: {Det-} & Obj-; Obj is a last word in a sentence and connected to Det on left (optional) <Verb> : Sub- & {Obj+}; Verb connected to Obj on right (optional) and connected to Sub on left.
Example of Link Parser The girl sings a song Here, The:d, girl:n, sings:v, a:d and song:n Then, Link Grammar representation is The(d) girl(n) sings(v) a(d) song(n) | | | | Det- + +Sub- + + Det- + Sub+
2. CHART PARSER Chart parsing is generally credited to Martin Kay. Chart is a data structure which is maintained to keep a record of the positions of the words and new structure derived from the sentence. Keeps the record of rules which are recorded as the active arcs on the chart.
Example of Chart Parsing 1 The 2 cute 3 girl 4 sings 5 a 6 song 7
3. SIMPLE TRANSITION NETWORK Convenient for visualizing grammar. Consists of nodes and labeled arcs. The final arc is called as Pop. d np1 vp d np2 pop n1 n2 n3 n4 n5 n6
Example of Simple Transition Network A girl is standing at the bus-stop d np1 t vp pp d np2 A girl is standing at the bus-stop Pop
4. RECURSIVE TRANSITION NETWORK Similar to Simple Transition Network. Allows arc labels that refer to other networks rather than word categories. The structural elements of a well-formed sentence may also be well-formed sentences by themselves.
Example of Recursive Transition Network Alice jumps and Bob runs Noun Verb S and Alice jumps Bob runs
5. AUGMENTED TRANSITION NETWORK Extension of Recursive Transition Network. Produces the data structure suitable for further processing. Capable of storing semantic details. Internally performs tests and takes actions during arc transitions.
Example of Augmented Transition Network John will hit the door (S SUBJ (NP NAME John ) MAIN VERB will ADV hit TENSE FUTURE OBJ (NP DET the HEAD door ))
6. DEFINITE CLAUSE GRAMMAR Developed by Fernando Pereira and David Warren in the year 1980. Extension of Context Free Grammar (CFG). One of the important applications of Prolog . Used to express any natural language grammar in limited sense. Rules are separated by an arrow symbol - - > Left side of the rule contains a part of ordinary Prolog rules. Right side of the rule contains a condition or body of Prolog.