(self, config_path=None, ping=False)
| 203 | |
| 204 | class 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"): |
nothing calls this directly
no test coverage detected