MCPcopy Create free account
hub / github.com/Tencent/NeuralNLP-NeuralClassifier / __init__

Method __init__

config.py:22–29  ·  view source on GitHub ↗
(self, config=None, config_file=None)

Source from the content-addressed store, hash-verified

20 """
21
22 def __init__(self, config=None, config_file=None):
23 if config_file:
24 with open(config_file, 'r') as fin:
25 config = json.load(fin)
26
27 self.dict = config
28 if config:
29 self._update(config)
30
31 def __getitem__(self, key):
32 return self.dict[key]

Callers

nothing calls this directly

Calls 1

_updateMethod · 0.95

Tested by

no test coverage detected