MCPcopy Index your code
hub / github.com/clips/pattern / __init__

Method __init__

pattern/text/search.py:401–407  ·  view source on GitHub ↗
(self, wordnet=None)

Source from the content-addressed store, hash-verified

399class WordNetClassifier(Classifier):
400
401 def __init__(self, wordnet=None):
402 if wordnet is None:
403 try: from en import wordnet
404 except:
405 pass
406 Classifier.__init__(self, self._parents, self._children)
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()]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected