Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

cwebbbi/PowerBITextAnalytics

Repository files navigation

PowerBITextAnalytics

A Power BI custom data connector for the Microsoft Cognitive Services Text Analytics API

Full documentation for the Text Analytics API can be found here and there is more detailed documentation available for the Detect Language, Key Phrases and Sentiment APIs.

Note: you will need to sign up for the Text Analytics API and obtain an access key before you use this custom data connector. A number of pricing tiers are available, including a free tier that allows for 5000 calls per month.

Functionality

This custom data connector exposes three M functions:

  • TextAnalytics.DetectLanguage(inputtext as list, optional numberoflanguages as number) as table This function takes a list of text values and returns a table containing the input text and the language detected in each piece of text
  • TextAnalytics.KeyPhrases(inputtext as list, optional languages as list) as table This function takes a list of text values (and an optional list of language identifiers for each piece of text) and returns a table containing the input text and key phrases detected in each piece of text. More than one key phrase may be returned for each piece of text.
  • TextAnalytics.Sentiment(inputtext as list, optional languages as list) as table This function takes a list of text values (and an optional list of language identifiers for each piece of text) and returns a table containing the input text and a score representing the sentiment detected for each piece of text.

There are a number of examples of how these functions can be used in the TextAnalytics.query.pq file included in the project, in the example Power BI .pbix file, as well as this blog post on Chris Webb's BI Blog.

About

A Power BI custom data connector to call the Microsoft Cognitive Services Text Analytics API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published