I'm a beginner in NLP.
What are the main steps to build a dependency parser?
thanks.
Linguistics Stack Exchange is a question and answer site for professional linguists and others with an interest in linguistic research and theory. It only takes a minute to sign up.
Sign up to join this communityI'm a beginner in NLP.
What are the main steps to build a dependency parser?
thanks.
I suppose you mean a rule-based parser since nobody would think of developing his own statistical parser (there are so many good open-source libraries).
Building a parser is quite complicated. The best way is to have a context-free grammar (CF parsing is trivial) and build up the dependency structures via constraint rules. This is how LFG works, whose f-structures are just plain old dependency trees (in general they are DAGs but can be thought of as trees with coreferences).
If you don't want a context-free backbone in the parser (which doesn't make much sense for most Indo-European languages), you should devise syntax rules based on feature constraints. The dependency tree of a phrase or sentence is a rooted spanning tree over a graph whose nodes are the words of the phrase with edges representing possible dependencies that conform to the constraint rules. In Latin, for example, one would say that an adjective depends on a noun if they agree in case, gender, and number, such as puella pulchra (nominative), puellam pulchram (accusative), etc. Likewise, verb phrases would be constructed via constraints. In a sentence like tu pecuniam debes, the constraining rules must state that the subject of a verb is in nominative and its direct object in accusative. But note that in most languages you'd need a ton of word order rules (that's why it's better to use a context-free backbone). Moreover a good parser needs a lexicon with valency frames to resolve ambiguous structures.
A simple parser can be quickly developed in Prolog.