Yields the synset that is the semantic parent, for example: synsets("train")[0].hypernym => Synset("public transport").
(self)
| 243 | |
| 244 | @property |
| 245 | def hypernym(self): |
| 246 | """ Yields the synset that is the semantic parent, for example: |
| 247 | synsets("train")[0].hypernym => Synset("public transport"). |
| 248 | """ |
| 249 | p = self._synset.getPointers(wn.HYPERNYM) |
| 250 | return len(p) > 0 and Synset(p[0].getTarget()) or None |
| 251 | |
| 252 | def similar(self): |
| 253 | """ Returns a list of similar synsets for adjectives and adverbs, for example: |
nothing calls this directly
no test coverage detected