1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-presidio

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
index.md 2.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Omri Mendels Отправлено 11.01.2024 14:13 2a8d3ec

Azure AI Language Integration

Introduction

Azure Text Analytics is a cloud-based service that provides advanced natural language processing over raw text. One of its main functions includes Named Entity Recognition (NER), which has the ability to identify different entities in text and categorize them into pre-defined classes or types. This document will demonstrate Presidio integration with Azure Text Analytics.

Supported entity categories in the Text Analytics API

Azure AI Language supports multiple PII entity categories. The Azure AI Laguage service runs a predictive model to identify and categorize named entities from an input document. The service's latest version includes the ability to detect personal (PII) and health (PHI) information. A list of all supported entities can be found in the official documentation.

Prerequisites

To use Azure AI Language with Preisido, an Azure AI Language resource should first be created under an Azure subscription. Follow the official documentation for instructions. The key and endpoint, generated once the resource is created, will be used when integrating with Text Analytics, using a Presidio Text Analytics recognizer.

Azure AI Language Recognizer

The implementation of a AzureAILanguage recognizer can be found here.

How to integrate Azure AI Language into Presidio

  1. Install the package with the azure-ai-language extra:
pip install "presidio-analyzer[azure-ai-language]"
  1. Define environment varibles AZURE_AI_KEY and AZURE_AI_ENDPOINT

  2. Add the AzureAILanguageRecognizer to the recognizer registry:

from presidio_analyzer import AnalyzerEngine
from presidio_analyzer.predefined_recognizers import AzureAILanguageRecognizer
  
azure_ai_language = AzureAILanguageRecognizer()

analyzer = AnalyzerEngine()
analyzer.registry.add_recognizer(azure_ai_language)

analyzer.analyze(text="My email is email@email.com", language="en")

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-presidio.git
git@api.gitlife.ru:oschina-mirror/mirrors-presidio.git
oschina-mirror
mirrors-presidio
mirrors-presidio
main