MCPcopy Create free account
hub / github.com/ScienciaLAB/document-qa / __init__

Method __init__

document_qa/ner_client_generic.py:205–216  ·  view source on GitHub ↗
(self, config_path=None, ping=False)

Source from the content-addressed store, hash-verified

203
204class NERClientGeneric(ApiClient):
205 def __init__(self, config_path=None, ping=False):
206 self.config = None
207 if config_path is not None:
208 self.config = self._load_yaml_config_from_file(path=config_path)
209 super().__init__(self.config["grobid"]["server"])
210
211 if ping:
212 result = self.ping_service()
213 if not result:
214 raise Exception("Grobid is down.")
215
216 os.environ["NO_PROXY"] = "nims.go.jp"
217
218 @staticmethod
219 def _load_json_config_from_file(path="./config.json"):

Callers

nothing calls this directly

Calls 3

ping_serviceMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected