Wordnet path between two synsets

888 views
Skip to first unread message

Pyry Takala

unread,
Mar 14, 2015, 8:23:04 AM3/14/15
to nltk-...@googlegroups.com
Is there any ready way to find a path between two wordnet synsets? NLTK can find me the length of the shortest path, but I would like to have actually a list of the items on the path?

If not, is the best implementation just to find hypernyms for both synsets, until they have a common node?

Steven Bird

unread,
Mar 15, 2015, 7:20:31 PM3/15/15
to nltk-...@googlegroups.com
Pyry, I suggest that you make a copy of the shortest_path_distance method, and modify it to return the path instead of the length of the path.



On Sat, 14 Mar 2015 at 23:23 Pyry Takala <pyry....@gmail.com> wrote:
Is there any ready way to find a path between two wordnet synsets? NLTK can find me the length of the shortest path, but I would like to have actually a list of the items on the path?

If not, is the best implementation just to find hypernyms for both synsets, until they have a common node?

--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nltk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages