'What's the most convenient way to analyze a sentence phrases and structure using NLTK or SpaCy?
What's the most convenient way to analyze a sentence phrases and structure using NLTK or SpaCy? The main goal is to get a well organized and clean data in order to apply some inferential statistics on it.
Here is a simple example of what I need, as shown in the tree above:
Solution 1:[1]
The most convenient way is to use dependency parsing from spacy. https://spacy.io/usage/linguistic-features#dependency-parse From its output you can extract whatever information you need. It is important to memorize that no parser will ever have perfect accuracy, so best choose a large model to guarantee good quality.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Langueneers |

