Header image by https://unsplash.com/@v2osk

Extract named entities using Azure Cognitive Services

const entityResults = await client.recognizeEntities( [text] );
for (let document of entityResults) {
if (document.entities) {
processedEntities = {}
for (let entity of document.entities) {
if (!drug[element.key]) {
drug[element.key] = [];
}
var tag = {};
tag.name = entity.text;
tag.category = entity.category;
drug[element.key].push(tag);
}
}
};

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aymen Furter

I am a Cloud Solution Architect working for Microsoft. The views expressed on this site are mine alone and do not necessarily reflect the views of my employer.