/ Модель

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

Контекст
512 токенов
Параметры
136 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Опубликована
3 июн 2023

bert-italian-uncased-ner

Разметка токеновТекст → label

Итальянская модель BERT для выделения имён людей, мест, организаций и других сущностей в тексте.

127скачиваний за 30 дней2лайкавеса обновлены5 июл 2023

Бенчмарки

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

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

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

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

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

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

Это модель BERT base без учёта регистра для распознавания именованных сущностей в итальянском тексте. Разработчик дообучил предварительно обученную модель bert-base-italian-uncased на итальянском наборе WikiNER и примерно 3 500 вручную размеченных абзацах Википедии. Модель выделяет четыре класса сущностей: людей, места, организации и прочие сущности, включая события, продукты и услуги.

Модель предназначена для разметки веб-страниц, новостей, энциклопедических и других грамотных цифровых текстов. В README сообщается о F1 90,32 на тестовой выборке WikiNER; метрики рассчитаны на уровне токенов и усреднены по четырём классам. Архитектура — BERT для классификации токенов, размер — 136,4 млн параметров, максимальный контекст — 512 токенов.

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

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

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

Ограничения

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

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

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

Открыть на Hugging Face


This is a BERT [1] uncased model for the Italian language, fine-tuned for Named Entity Recognition (Person, Location, Organization and Miscellanea classes) on the WikiNER dataset [2], using the uncased BERT-ITALIAN (bert-base-italian-uncased) as a pre-trained model.

This is an uncased, base size BERT model. If you are looking for a cased model, you can refer to: https://huggingface.co/osiria/bert-italian-cased-ner

The model is trained to perform entity recognition over 4 classes: PER (persons), LOC (locations), ORG (organizations), MISC (miscellanea, mainly events, products and services). It has been fine-tuned for Named Entity Recognition, using the WikiNER Italian dataset plus an additional custom dataset of manually annotated Wikipedia paragraphs. The WikiNER dataset has been splitted in 102.352 training instances and 25.588 test instances, and the model has been trained for 1 epoch with a constant learning rate of 1e-5.

The performances on the test set are reported in the following table:

RecallPrecisionF1
90.1090.5690.32

The metrics have been computed at the token level and then macro-averaged over the 4 classes.

Then, since WikiNER is an automatically annotated (silver standard) dataset, which sometimes contains imperfect annotations, an additional fine-tuning on ~3.500 manually annotated paragraphs has been performed.

from transformers import BertTokenizerFast, BertForTokenClassification

tokenizer = BertTokenizerFast.from_pretrained("osiria/bert-italian-uncased-ner")
model = BertForTokenClassification.from_pretrained("osiria/bert-italian-uncased-ner")

from transformers import pipeline
ner = pipeline("ner", model = model, tokenizer = tokenizer, aggregation_strategy="first")

ner("mi chiamo marco rossi, vivo a roma e lavoro per l'agenzia spaziale italiana nella missione prisma")

[{'entity_group': 'PER',
  'score': 0.9984422,
  'word': 'marco rossi',
  'start': 10,
  'end': 21},
 {'entity_group': 'LOC',
  'score': 0.9976732,
  'word': 'roma',
  'start': 30,
  'end': 34},
 {'entity_group': 'ORG',
  'score': 0.99747753,
  'word': 'agenzia spaziale italiana',
  'start': 50,
  'end': 75},
 {'entity_group': 'MISC',
  'score': 0.96949625,
  'word': 'prisma',
  'start': 91,
  'end': 97}]

You can also try the model online using this web app: https://huggingface.co/spaces/osiria/bert-italian-uncased-ner

[1] https://arxiv.org/abs/1810.04805

[2] https://www.sciencedirect.com/science/article/pii/S0004370212000276

This model is mainly trained on Wikipedia, so it's particularly suitable for natively digital text from the world wide web, written in a correct and fluent form (like wikis, web pages, news, etc.). However, it may show limitations when it comes to chaotic text, containing errors and slang expressions (like social media posts) or when it comes to domain-specific text (like medical, financial or legal content).

The model is released under Apache-2.0 license

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

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

GPU в ailist

Универсальный рантайм · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForTokenClassification
Ревизия весов
d6a6049

0 моделей