Constituency vs. Dependency Parsing

Lucas Kohorst
6 min readDec 13, 2019

Sentence parsing can be helpful in understanding the meaning, structure, and syntactical relationships in sentences. Two common types are dependency and constituency parsing which is also known as syntactical parsing. Dependency parsing is the process of defining the grammatical structure of a sentence by listing each word as a node and displaying links to its dependents. A constituency parsed tree displays the syntactic structure of a sentence using context-free grammar. Unlike dependency parsing which relies on dependency grammar. Both types of parsing are important in computational linguistics but there is much debate over which is better. Critics of constituency parsing say that it displays extraneous information while supporters like to visualize the entire sentence structure rather than just the grammatical dependencies.

I created a dependency and constituency sentence tree visualizer in order to analyze the two parsing systems published as an NPM package, react-sentence-tree. This project relied on using React as the web framework, Stanford CoreNLP as the parsing server, and react-d3-tree to visualize the parsed sentences. Using these technologies, I created an open-source Node.js package for other developers to use and expand upon along with a demo web app. With this package, I tested various sentences, such as sentence fragments, non-projective and ambiguous sentences to…

--

--