Parent-child relationships refer to dependencies between elements of a sentence. This can be subject-verb, adjective-noun, or similar type relationships. In this recipe, we will illustrate how these types of relationships can be found in text. We will use the Stanford NLP API to identify these relationships.
Identifying parent-child relationships in text
Getting ready
To prepare, we need to do the following:
- Create a new Maven project
- Add the following dependency to the POM file:
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.9.2</version>
</dependency>
In a browser, perform the following steps:
- Navigate to https...