def get_conn(self) -> LanguageServiceClient: """ Retrieves connection to Cloud Natural Language service. :return: Cloud Natural Language service object :rtype: google.cloud.language_v1.LanguageServiceClient """ if not self._conn: self._conn = LanguageServiceClient(credentials=self._get_credentials(), client_info=CLIENT_INFO) return self._conn
def __init__(self): self._gcp_client = LanguageServiceClient()