(self, word, pos="NN")
| 407 | self.wordnet = wordnet |
| 408 | |
| 409 | def _children(self, word, pos="NN"): |
| 410 | try: return [w.senses[0] for w in self.wordnet.synsets(word, pos)[0].hyponyms()] |
| 411 | except KeyError: |
| 412 | pass |
| 413 | |
| 414 | def _parents(self, word, pos="NN"): |
| 415 | try: return [w.senses[0] for w in self.wordnet.synsets(word, pos)[0].hypernyms()] |