I need to develop a project in Java that uses the Stanford analyzer to separate sentences and needs to generate a graph that shows the relationship between the words in the sentence. For example: Ohio is located in America. Exit:

image shows a graph. But the output should not be like that, but it should show the connection between the words in the form of a graph. A graph can be generated using Jgraph, Jung. But first, I need to integrate the parser software into my program. So how can I integrate the parser?
source
share