I feel this should be relatively straightforward, if I run the code:
TextStructure["I read the book he wrote.", "DependencyStrings"]
I get as string:
{"(read, 2)((nsubj, (I, 1)), (dobj, (book, 4)((det, (the, 3)),
(rcmod, (wrote, 6)((nsubj, (he, 5)))))))"}
I want to convert this into a nested list I can index.
Thanks in advance.
{"(read, 2)((nsubj, (I, 1)), (dobj, (book, 4)((det, (the, 3)), (rcmod, (wrote, 6)((nsubj, (he, 5)))))))"}
$\endgroup$