What indicates the methodology in the image? Python Programming

I am trying to implement a process as shown in the image below for a text summary:
Concept image.

I figured out that the second step is to generate a dependency graph with Stanford Parser. Here is the code:

from nltk.parse.stanford import StanfordDependencyParser
path_to_jar = 'path_to/stanford-parser-full-2014-08-27/stanford-parser.jar'
path_to_models_jar = 'path_to/stanford-parser-full-2014-08-27/stanford-parser-3.4.1-models.jar'
dependency_parser = StanfordDependencyParser(path_to_jar=path_to_jar, path_to_models_jar=path_to_models_jar)

result = dependency_parser.raw_parse('I shot an elephant in my sleep')
dep = result.next()
list(dep.triples())

      

But the part I can't get is the third and fourth. Please help me understand this. If possible, what is the possible implementation of the third and fourth. Please help me.

+3


source to share





All Articles