Sentiment Analysis (Basic Edition)
- Example request
//You are advised to construct and use the client in a singleton pattern to avoid frequent object creation. NluClient client = new NluClient (AuthMode.AKSK,authInfo); GeneralSentimentReq req = new GeneralSentimentReq(); req.setContent("Text for analysis"); try { GeneralSentimentResp resp = client.getSentiment(req); } catch (NlpException e) { //A failure is thrown as an exception. For details about exceptions, see section "Exceptions". The client automatically processes exceptions. }
Last Article: Calling LU APIs
Next Article: Sentiment Analysis (Domain-specific Edition)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.