Computational Linguistics 8, Exercise 1: adding "torch" Code (run with py -X utf8, after the chapter's hypernym script): hyper["torch"] = "light_source" print(dist("torch", "lamp"), dist("torch", "lantern"), dist("torch", "candle")) Output from the run: 2 3 2 Prediction: torch and lamp are both direct children of light_source, so each is one step up to the shared parent: 1 + 1 = 2. Candle is also a child of light_source: 2. Lantern is a child of lamp, so it needs one extra step: 2 + 1 = 3. Why torch is not closer to lantern: lantern sits one level lower, under lamp, so any path to it goes through lamp. In this tree, specific terms are farther from outside siblings than their parents are. This is a property of my tree and of this simple distance measure; the WordNet article says only that distance in the graph can measure similarity, and I do not claim WordNet distances behave the same way.