$ python -i hypernyms.py Usage: python hypernyms.py word1.pos.n word2.pos.n >>> help(common) >>> help(hypernyms) >>> wn.synsets('table') [Synset('table.n.01'), Synset('table.n.02'), Synset('table.n.03'), Synset('mesa.n.01'), Synset('table.n.05'), Synset('board.n.04'), Synset('postpone.v.01'), Synset('table.v.02')] >>> wn.synsets('table')[3] Synset('mesa.n.01') >>> wn.synsets('table')[3].lemmas() [Lemma('mesa.n.01.mesa'), Lemma('mesa.n.01.table')] >>> wn.morphy('tables') 'table' >>> wn.morphy('table') 'table' >>> wn.synsets('tables') [Synset('table.n.01'), Synset('table.n.02'), Synset('table.n.03'), Synset('mesa.n.01'), Synset('table.n.05'), Synset('board.n.04'), Synset('postpone.v.01'), Synset('table.v.02')] >>> wn.morphy('geese') 'goose' >>> hypernyms(wn.synsets('table')[1]) [Synset('entity.n.01'), Synset('physical_entity.n.01'), Synset('object.n.01'), Synset('whole.n.02'), Synset('artifact.n.01'), Synset('instrumentality.n.03'), Synset('furnishing.n.02'), Synset('furniture.n.01')] >>> >>> common(wn.synsets('table')[1], wn.synsets('stool')[0]) Synset('furniture.n.01') >>> $ python hypernyms.py table.n.02 stool.n.01 Synset('table.n.02') Synset('stool.n.01') have lowest common hypernym Synset('furniture.n.01') $ $