use of com.tencentcloudapi.nlp.v20190408.NlpClient in project cloud-sdk by mizhousoft.
the class SensitiveWordsRecognitionServiceImpl method init.
public void init(NLPProfile profile) throws CloudSDKException {
NLPProfileValidator.validate(profile);
Credential cred = new Credential(profile.getAccessKey(), profile.getSecretKey());
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint(profile.getEndpoint());
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
NlpClient client = new NlpClient(cred, profile.getRegion(), clientProfile);
this.nlpClient = client;
LOG.info("Init nlp client successfully.");
}
Aggregations