MCPcopy Create free account
hub / github.com/clips/pattern / _children

Method _children

pattern/text/search.py:409–412  ·  view source on GitHub ↗
(self, word, pos="NN")

Source from the content-addressed store, hash-verified

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()]

Callers

nothing calls this directly

Calls 1

hyponymsMethod · 0.80

Tested by

no test coverage detected