public async Task ExtractKeyPhrasesTest() { TextAnalyticsClient client = GetClient(); string document = singleEnglish; KeyPhraseCollection keyPhrases = await client.ExtractKeyPhrasesAsync(document); Assert.AreEqual(2, keyPhrases.Count); Assert.IsTrue(keyPhrases.Contains("cat")); Assert.IsTrue(keyPhrases.Contains("veterinarian")); }
public async Task ExtractKeyPhrasesWithLanguageTest() { TextAnalyticsClient client = GetClient(); string document = SingleSpanish; KeyPhraseCollection keyPhrases = await client.ExtractKeyPhrasesAsync(document, "es"); ValidateInDocumenResult(keyPhrases, 2); Assert.IsTrue(keyPhrases.Contains("perro")); Assert.IsTrue(keyPhrases.Contains("veterinario")); }
public async Task ExtractKeyPhrasesTest() { TextAnalyticsClient client = GetClient(); string document = SingleEnglish; KeyPhraseCollection keyPhrases = await client.ExtractKeyPhrasesAsync(document); ValidateInDocumenResult(keyPhrases, 2); Assert.IsTrue(keyPhrases.Contains("cat")); Assert.IsTrue(keyPhrases.Contains("veterinarian")); }