/ Модель

Характеристики

Размер весов
2,3 ГБ
Лицензия
Apache 2.0
Базовая модель
gliner_multi_pii-v1
Библиотека
gliner
Опубликована
17 июл 2024

gliner-multi-pii-domains-v1

Разметка токеновТекст → label7 профессий

Дообученная модель GLiNER для извлечения персональных и других чувствительных сущностей из текста на нескольких языках.

1 202скачиваний за 30 дней21лайквеса обновлены6 дек 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

GLiNER Multi PII Domains — модель распознавания именованных сущностей, разработанная E3-JSI путём дообучения urchade/gliner_multi_pii-v1 на синтетическом наборе E3-JSI/synthetic-multi-pii-ner-v1. Она использует двунаправленный трансформерный энкодер семейства BERT и предназначена для извлечения персональных данных и других чувствительных сущностей из текста: имён людей и организаций, контактных данных, идентификаторов документов, финансовых и медицинских сведений и других типов PII.

Модель подходит для выявления чувствительных данных в медицинских текстах и других текстовых материалах, например перед их обезличиванием или проверкой. GLiNER позволяет задавать типы сущностей и служит компактной альтернативой крупным языковым моделям для сценариев с ограниченными ресурсами. Для работы требуется библиотека GLiNER. Модель распространяется по лицензии Apache-2.0.

В карточке приведены примеры на английском и нидерландском языках; метаданные указывают поддержку английского, французского, немецкого, испанского, португальского, итальянского, словенского, греческого и нидерландского. Качество распознавания зависит от языка, формата текста и типов сущностей; модель может пропускать данные или ошибочно выделять фрагменты, поэтому результаты чувствительных проверок следует контролировать.

Сценарии применения

  • поиск персональных данных в медицинских текстах
  • извлечение адресов, телефонов и электронной почты
  • поиск номеров документов и государственных идентификаторов
  • обнаружение банковских реквизитов и данных платёжных карт
  • выявление медицинских сведений и идентификаторов страхования
  • подготовка текста к обезличиванию

Ограничения

Модель может пропускать чувствительные сущности или ошибочно выделять фрагменты, поэтому результаты требуют проверки, особенно перед обезличиванием. Карточка не приводит количественных оценок качества.

Для каких профессий подходит7

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

GLiNER Multi PII Domains

GLiNER is a Named Entity Recognition (NER) model capable of identifying any entity type using a bidirectional transformer encoder (BERT-like). It provides a practical alternative to traditional NER models, which are limited to predefined entities, and Large Language Models (LLMs) that, despite their flexibility, are costly and large for resource-constrained scenarios.

This model has been trained by fine-tuning urchade/gliner_multi_pii-v1 on the synthetic dataset E3-JSI/synthetic-multi-pii-ner-v1.

This model is capable of recognizing various types of personally identifiable information (PII), including but not limited to these entity types: person, organization, phone number, address, passport number, email, credit card number, social security number, health insurance id number, date of birth, mobile phone number, bank account number, medication, cpf, driver's license number, tax identification number, medical condition, identity card number, national id number, ip address, email address, iban, credit card expiration date, username, health insurance number, registration number, student id number, insurance number, flight number, landline phone number, blood type, cvv, reservation number, digital signature, social media handle, license plate number, cnpj, postal code, passport number, serial number, vehicle registration number, credit card brand, fax number, visa number, insurance company, identity document number, transaction number, national health insurance number, cvc, birth certificate number, train ticket number, passport expiration date, and social security number.

Usage

To use the model, one must use the GLiNER library. Once installed, the user can load the model and use it to discern the entities within the text.

pip install gliner

What follows are some examples of its intended use.

Extract entities from English medical text

from gliner import GLiNER

# initialize the GLiNER using this model
model = GLiNER.from_pretrained("E3-JSI/gliner-multi-pii-domains-v1")

# prepare the text for entity extraction
text = """
Medical Record

Patient Name: John Doe
Date of Birth: 15-01-1985
Date of Examination: 20-05-2024
Social Security Number: 123-45-6789

Examination Procedure:
John Doe underwent a routine physical examination. The procedure included measuring vital signs (blood pressure, heart rate, temperature), a comprehensive blood panel, and a cardiovascular stress test. The patient also reported occasional headaches and dizziness, prompting a neurological assessment and an MRI scan to rule out any underlying issues.

Medication Prescribed:

Ibuprofen 200 mg: Take one tablet every 6-8 hours as needed for headache and pain relief.
Lisinopril 10 mg: Take one tablet daily to manage high blood pressure.
Next Examination Date:
15-11-2024
"""

# prepare the labels/entities to be extracted
# this model should work best when entity types are in lowercase
labels = ["name", "social security number", "date of birth", "date"]

# perform entity extraction
entities = model.predict_entities(text, labels, threshold=0.5)

# display predicted entities and their labels
for entity in entities:
    print(entity["text"], "=>", entity["label"])

Expected output

John Doe => name
15-01-1985 => date of birth
20-05-2024 => date
123-45-6789 => social security number
John Doe => name
15-11-2024 => date

Extract entities from Dutch medical text

from gliner import GLiNER

# initialize the GLiNER using this model
model = GLiNER.from_pretrained("E3-JSI/gliner-multi-pii-domains-v1")

# prepare the text for entity extraction
text = """
Medisch dossier

Naam patiënt: Jan de Vries
Geboortedatum: 15-01-1985
Datum van onderzoek: 20-05-2024
Burgerservicenummer: 987-65-4321

Onderzoeksprocedure:
Jan de Vries onderging een routine lichamelijk onderzoek. De procedure omvatte het meten van de vitale functies (bloeddruk, hartslag, temperatuur), een uitgebreid bloedonderzoek en een cardiovasculaire inspanningstest. De patiënt meldde ook af en toe hoofdpijn en duizeligheid, wat aanleiding gaf tot een neurologische beoordeling en een MRI-scan om eventuele onderliggende problemen uit te sluiten.

Voorgeschreven medicatie:

Paracetamol 500 mg: Neem één tablet elke 6-8 uur indien nodig voor hoofdpijn en pijnverlichting.
Amlodipine 5 mg: Neem één tablet dagelijks om hoge bloeddruk te beheersen.

Volgende onderzoekdatum:
15-11-2024
"""

# prepare the labels/entities to be extracted
# this model should work best when entity types are in lowercase
labels = ["naam", "bmurgerservicenummer", "geboortedatum", "datum"]

# perform entity extraction
entities = model.predict_entities(text, labels, threshold=0.2)

# display predicted entities and their labels
for entity in entities:
    print(entity["text"], "=>", entity["label"])

Expected output

Jan de Vries => naam
15-01-1985 => geboortedatum
20-05-2024 => datum
987-65-4321 => bmurgerservicenummer
Jan de Vries => naam
15-11-2024 => datum

Aknowledgements

Funded by the European Union. UK participants in Horizon Europe Project PREPARE are supported by UKRI grant number 10086219 (Trilateral Research). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or European Health and Digital Executive Agency (HADEA) or UKRI. Neither the European Union nor the granting authority nor UKRI can be held responsible for them. Grant Agreement 101080288 PREPARE HORIZON-HLTH-2022-TOOL-12-01.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · gliner

Нельзя запустить

Модели GLiNER требуют отдельного рантайма.

Ревизия весов
66b7951

0 моделей