Search in sources :

Example 1 with NlpClient

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.");
}
Also used : Credential(com.tencentcloudapi.common.Credential) ClientProfile(com.tencentcloudapi.common.profile.ClientProfile) HttpProfile(com.tencentcloudapi.common.profile.HttpProfile) NlpClient(com.tencentcloudapi.nlp.v20190408.NlpClient)

Aggregations

Credential (com.tencentcloudapi.common.Credential)1 ClientProfile (com.tencentcloudapi.common.profile.ClientProfile)1 HttpProfile (com.tencentcloudapi.common.profile.HttpProfile)1 NlpClient (com.tencentcloudapi.nlp.v20190408.NlpClient)1