// Matt Text Analytics Part 7 public static void CallTextAnalyticsEntityAPI() { try { // Get the file name Console.WriteLine("Please enter a some text to analyze:"); var message = Console.ReadLine(); var document = new MultiLanguageInput() { Id = Guid.NewGuid().ToString(), Language = "en-US", Text = message }; var documentList = new List <MultiLanguageInput>(); documentList.Add(document); var query = new TextAnalyticsQuery(Constants.TEXT_ANALYTICS_PREVIEW_URL, Constants.TEXT_ANALYTICS_KEY, documentList.ToArray()); var result = TextAnalyticsService.callTextAnalyticsEntityAPI(query).Result; ExportJSON(JsonConvert.SerializeObject(result)); Console.WriteLine("\nPress Enter to exit "); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine("Error: " + ex.Message); Console.ReadLine(); throw; } }