static public List <string> ExtractSentences(string Paragraph) { Configuration.Default.AddApiKey("Apikey", APIKey); var apiInstance = new SentencesApi(); try { // Extract sentences from string string result = apiInstance.SentencesPost(Paragraph); string[] Sentences_ = result.Replace("\\r", "").Split(new String[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries); for (int x = 0; x < Sentences_.Length; x++) { Sentences_[x] = Sentences_[x].Replace("\"", ""); } return(Sentences_.ToList <string>()); } catch (Exception) { return(null); } }
public string ExtractSentencesFromString(string para) { //api key //29809699 - a20d - 448a - 85a8 - 83956f239c00 // Configure API key authorization: Apikey Configuration.Default.AddApiKey("Apikey", "29809699-a20d-448a-85a8-83956f239c00"); string result = ""; var apiInstance = new SentencesApi(); var input = para; // string | Input string try { // Extract sentences from string result = apiInstance.SentencesPost(input); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling SentencesApi.SentencesPost: " + e.Message); } return(result); }