
Code Recap
static void GetKeyPhrases ( TextAnalyticsClient textAnalyticsClient, string text)
{
var response = textAnalyticsClient.ExtractKeyPhrases(text);
Console.WriteLine( " Key phrases: " );
foreach ( string keyphrase in response.Value)
{
Console.WriteLine( $ " \t {keyphrase} " );
}
}
Then called with:
GetKeyPhrases(textAnalyticsClient, " the cat sat on the mat " );
Statement Analysis
“The call will output key phrases from the input string to the console.”
Yes.
The method calls ExtractKeyPhrases , iterates over response.Value , and writes each key phrase to the console.
“The output will contain the following words: the, cat, sat, on, and mat.”
No.
The Text Analytics key phrase extraction returns meaningful phrases, not stop words or every word.
Likely result: " cat " , " mat " , maybe " sat " depending on language model. But not " the " , " on " .
“The output will contain the confidence level for key phrases.”
No.
The ExtractKeyPhrases method in Text Analytics API returns only key phrases as strings, not confidence scores.
Final Answer
The call will output key phrases from the input string to the console → Yes
The output will contain the following words: the, cat, sat, on, and mat → No
The output will contain the confidence level for key phrases → No
Microsoft References
Azure Text Analytics – Key Phrase Extraction
TextAnalyticsClient.ExtractKeyPhrases