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

Method load

pattern/text/__init__.py:424–429  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

422 return self._path
423
424 def load(self):
425 # ["Alexander", "the", "Great", "PERS"]
426 # {"alexander": [["alexander", "the", "great", "pers"], ...]}
427 for x in _read(self.path):
428 x = [x.lower() for x in x.split()]
429 dict.setdefault(self, x[0], []).append(x)
430
431 def apply(self, tokens):
432 """ Applies the named entity recognizer to the given list of tokens,

Callers

nothing calls this directly

Calls 4

_readFunction · 0.85
splitMethod · 0.45
appendMethod · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected