< Back
Get-KeyPhrase
Post
NAME Get-KeyPhrase
SYNOPSIS
Recognize Key phrases in a given text or string.
SYNTAX
Get-KeyPhrase [-String] <String> [<CommonParameters>]
DESCRIPTION
Identifies Key phrases in a given text/string using Microsoft cognitive service's "Text Analytics" API.
NOTE : You need to subscribe the "Text Analytics API." before using the powershell script from the following link
and setup an environment variable like, $env:MS_TextAnalytics_API_key = "YOUR API KEY"
API Subscription Page - https://www.microsoft.com/cognitive-ser ... us/sign-up
PARAMETERS
-String <String>
String to search for named entities.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author: Prateek Singh - @SinghPrateik
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-KeyPhrase -String "my name is prateek and I live in New Delhi"
New Delhi
prateek
In above example, I passed an string to cmdlet in order to get the key phrases.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>"my name is prateek and I live in New Delhi", "I was born in Ayodhya" | Get-KeyPhrase
New Delhi
prateek
Ayodhya
You can also pass string from pipeline as the cmdlet accpets input from pipeline
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-Content C:\\Data\\File.txt | Out-String | Get-KeyPhrase
clients
confident making important business decisions
Computer Vision API
data
information
reliability
Convert content of a file to string and pipe to generate Key Phrases for the whole Document.
RELATED LINKS
SYNOPSIS
Recognize Key phrases in a given text or string.
SYNTAX
Get-KeyPhrase [-String] <String> [<CommonParameters>]
DESCRIPTION
Identifies Key phrases in a given text/string using Microsoft cognitive service's "Text Analytics" API.
NOTE : You need to subscribe the "Text Analytics API." before using the powershell script from the following link
and setup an environment variable like, $env:MS_TextAnalytics_API_key = "YOUR API KEY"
API Subscription Page - https://www.microsoft.com/cognitive-ser ... us/sign-up
PARAMETERS
-String <String>
String to search for named entities.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author: Prateek Singh - @SinghPrateik
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-KeyPhrase -String "my name is prateek and I live in New Delhi"
New Delhi
prateek
In above example, I passed an string to cmdlet in order to get the key phrases.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>"my name is prateek and I live in New Delhi", "I was born in Ayodhya" | Get-KeyPhrase
New Delhi
prateek
Ayodhya
You can also pass string from pipeline as the cmdlet accpets input from pipeline
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-Content C:\\Data\\File.txt | Out-String | Get-KeyPhrase
clients
confident making important business decisions
Computer Vision API
data
information
reliability
Convert content of a file to string and pipe to generate Key Phrases for the whole Document.
RELATED LINKS