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
python stanford-nlp


source to share


No one has answered this question yet

Check out similar questions:

9540
What does the yield keyword do?
5504
Does Python have a ternary conditional operator?
5433
What if __name__ == "__main__": do?
5231
What are metaclasses in Python?
3602
Does Python have a substring method "contains"?
2006
What does ** (double star / asterisk) and * (star / asterisk) do for parameters?
1069
How can I check which version of Python my script is running?
1028
What is the Python 3 equivalent "python -m SimpleHTTPServer"
1028
Which IDE should I use for Python?
989
If Python is interpreted, what are .pyc files?



All Articles
Loading...
X
Show
Funny
Dev
Pics