WordNet BFS Shortest Path
WordNet is a graph which represents a set of words, Synset can be interpreted as a set of words, which have same/similar meaning, For example AND_circuit AND_gate, have similar meaning "a circuit in a computer that fires only when all of its inputs fire" The Hypernym of a synset is a more general form of this synset, for example, "gate" is the hypernym of synset "AND_circuit AND_gate" and "OR_circuit OR_gate" (from priceton wordnet digraph) To find the distance between two synsets, we can use BFS, First of all we need to build graph, after that we can run BFS 1. run BFS on synset1, Complexity (V+E), we can get distance from synset1 to each synset 2. run BFS on synset2, Complexity (V+E), we can get distance from synset2 to each synset 3. Iterate through all synset and calculate the minimum of distance_to_synset1 + distance_to_synset2 Complexity (V) Thus the total complexity is (V+E) In reality a word ma...