For the below sentence, I earned a dependency graph, and I transformed this dependency graph to a networkx graph. Now, I would like to find the shortest path between the words "Acute Kidney Injury"
and "CYP3A4"
.
Because "Acute Kidney Injury"
has 3 nodes in the graph, I don't know, how I can find path between the aforementioned words.
Below the dependency_graph of the sentence:
Sentence:
"Acute Kidney Injury from Excessive Potentiation of Calcium-channel Blocker via Synergistic CYP3A4 Inhibition by Clarithromycin Plus Voriconazole."
Is there any way to do so?
As this is a non-trivial question I will try to provide some possible directions instead of a clear answer.
According to the question, you are able to find the shortest paths between two nodes in the dependency graph, but not able to do this on a phrase.
You can try to:
Acute Kidney
has the dependencies compound with Injury
, meaning Acute Kidney
is actually a part of the phrase.Acute Kidney Injury
, Injury
is the parent node.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.