Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hi all,
can anyone help
i could be wrong but microsoft seem to have made entity detection availble in the ACS. im trying to call it but am getting cannot convert a record into type text!
this is the code - i cant write M, i pinched it from the MS guidance for key phrases and adapted it for entities. I'm invoking the function on a sngle column of unstructured survey responses. i've cleaned it for sentiment analysis, so uneccesary punctuation and non lexical characters are gone
// Returns entities from the text in a comma-separated list
(text) => let
apikey = " xxxx ",
endpoint = "https://uksouth.api.cognitive.microsoft.com/text/analytics/v2.0/entities",
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }",
bytesbody = Text.ToBinary(jsonbody),
headers = [#"Ocp-Apim-Subscription-Key" = apikey],
bytesresp = Web.Contents(endpoint, [Headers=headers, Content=bytesbody]),
jsonresp = Json.Document(bytesresp),
entities = Text.Lower(Text.Combine(jsonresp[documents]{0}[entities], ", "))
in entities
Hi cxputcm,
Maybe this similar thread case help you: https://community.powerbi.com/t5/Desktop/Expression-Error-We-cannot-convert-a-value-of-type-Record-t....
Regards,
Jimmy Tao
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |