40 likes | 189 Vues
This week, we delve into parsing algorithms as essential techniques in Natural Language Processing (NLP). A parsing algorithm systematically explores combinations of grammatical rules to build a syntactic structure represented as a tree, which mirrors the input sentence's composition. We focus on the Top-Down Parsing approach, which starts with the starting symbol and rewrites it into terminal symbols based on input word classes. The use of a Lexicon helps optimize the storage of possible word categories, simplifying the grammar rules.
E N D
PARSING Techniques NLP – week 5 (WAES2203) rmana@um.edeu.my
PARSING ALGORITHM • A procedure that searches through various ways of combining Grammatical rules to find a combination that generates a TREE that could be the structure of the input sentence • Simple way: return YES or NO answer (whether a certain sentence is accepted y the grammar or not)
A Top-Down Parser • Start with the S symbol & attempts to rewrite it into a sequence of terminal symbols that matches the classes of the words in the input sentence • The state of the parse at any given time can be represented as a list of symbols that are the result of operations applied so far, called the Symbol list • A structure called Lexicon is used to efficiently store the possible categories for each word (rather than having a separate rule to indicate the possible syntactic categories for each word)
Top Down Parser cont. • If lexicon is defined, a Grammar need not contain any lexical rules