Exemple #1
0
        public IActionResult CheckIfSentimentText([FromBody] ISentimentRequest request)
        {
            IActionResult result;

            try
            {
                result = predictionResultBuilder.BuildJsonPredictionResult(pEngine.Predict(request.ToSentimentData()), request);
            }
            catch (Exception ex)
            {
                result = predictionResultBuilder.BuildExceptionResult(ex);
            }

            return(result);
        }