/ Модель

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

Контекст
512 токенов
Параметры
49,9 млн
Архитектура
stacked_bert · dense
Библиотека
transformers
Опубликована
29 июл 2024

ner-stacked-bert-multilingual

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

Многоязычная модель Impresso на основе BERT распознаёт и классифицирует именованные сущности в исторических документах на английском, французском и немецком языках.

397скачиваний за 30 дней2лайкавеса обновлены21 ноя 2025

Бенчмарки

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

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

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

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

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

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

Impresso NER — модель распознавания именованных сущностей в оцифрованных исторических документах, разработанная командой Impresso в EPFL. Она предназначена для анализа архивных текстов на английском, французском и немецком языках, включая тексты с ошибками OCR, вариативным написанием и нестандартной языковой формой.

Модель использует стековую архитектуру на основе BERT: к предобученному многоязычному историческому BERT добавлены один или два слоя Transformer и декодер CRF. Это модель классификации токенов с 49,9 млн параметров и контекстом до 512 токенов. Она размечает сущности разных типов и уровней детализации, включая людей, организации, продукты, временные выражения и места; для людей может также извлекать имя, титул и функцию в контексте.

Модель дообучена на базе dbmdz/bert-medium-historic-multilingual-cased и оценивалась на датасете HIPE-2020. Она подходит для исторического извлечения информации, но не предназначена для современных новостей и социальных сетей; качество может снижаться на неевропейских языках и при сильном шуме OCR. Лицензия — AGPL-3.0-or-later.

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

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

Ограничения

Модель не предназначена для современных новостей и социальных сетей и может хуже работать на неевропейских языках. Шум OCR и исторические предубеждения могут приводить к ошибочным разметкам; для снижения ложных срабатываний может потребоваться постобработка.

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

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

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

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

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

Открыть на Hugging Face

Model Card for impresso-project/ner-stacked-bert-multilingual

The Impresso NER model is a multilingual named entity recognition model trained for historical document processing. It is based on a stacked Transformer architecture and is designed to identify fine-grained and coarse-grained entity types in digitized historical texts, including names, titles, and locations.

Model Details

Model Description

  • Developed by: EPFL from the Impresso team. The project is an interdisciplinary project focused on historical media analysis across languages, time, and modalities. Funded by the Swiss National Science Foundation (CRSII5_173719, CRSII5_213585) and the Luxembourg National Research Fund (grant No. 17498891).
  • Model type: Stacked BERT-based token classification for named entity recognition
  • Languages: French, German, English (with support for multilingual historical texts)
  • License: AGPL v3+
  • Finetuned from: dbmdz/bert-medium-historic-multilingual-cased

Model Architecture

The model architecture consists of the following components:

  • A pre-trained BERT encoder (multilingual historic BERT) as the base.
  • One or two Transformer encoder layers stacked on top of the BERT encoder.
  • A Conditional Random Field (CRF) decoder layer to model label dependencies.
  • Learned absolute positional embeddings for improved handling of noisy inputs.

These additional Transformer layers help in mitigating the effects of OCR noise, spelling variation, and non-standard linguistic usage found in historical documents. The entire stack is fine-tuned end-to-end for token classification.

Training and Evaluation Results

This evaluation corresponds to the HIPE-2020 dataset (v2.1), using French and German combined for training,
German (dev-de) for validation, and French (test-fr) for testing.

Training Hyperparameters

  • Training regime: Mixed precision (fp16)
  • Epochs: 5
  • Max sequence length: 512
  • Base model: dbmdz/bert-medium-historic-multilingual-cased
  • Stacked Transformer layers: 2

Results

The results below show performance on the French test set across multiple evaluation settings.

EvaluationLabelPRF1
NE-COARSE-LIT-micro-fuzzy-TIME-ALL-LED-ALLALL0.7970.8330.814
↑LOC0.8590.8620.860
↑ORG0.4320.4850.457
↑PERS0.8160.9080.860
↑PROD0.5310.4260.473
↑TIME0.8360.9620.895
NE-COARSE-LIT-micro-strict-TIME-ALL-LED-ALLALL0.6890.7200.704
↑LOC0.7970.8000.798
↑ORG0.3490.3920.370
↑PERS0.6400.7130.675
↑PROD0.4290.3440.382
↑TIME0.6390.7360.684
NE-COARSE-LIT-macro_doc-fuzzy-TIME-ALL-LED-ALLALL0.8240.8490.828
↑LOC0.8340.8770.845
↑ORG0.3930.5130.477
↑PERS0.8130.8890.858
↑PROD0.4830.3540.450
↑TIME0.8610.9170.956
NE-COARSE-LIT-macro_doc-strict-TIME-ALL-LED-ALLALL0.7200.7400.723
↑LOC0.7710.8150.783
↑ORG0.2780.3590.336
↑PERS0.6700.7270.705
↑PROD0.3580.2810.348
↑TIME0.7270.7460.796

Entity Types Supported

The model supports both coarse-grained and fine-grained entity types defined in the HIPE-2020/2022 guidelines. The output format of the model includes structured predictions with contextual and semantic details. Each prediction is a dictionary with the following fields:

{
  'type': 'pers' | 'org' | 'loc' | 'time' | 'prod',
  'confidence_ner': float,              # Confidence score
  'surface': str,                       # Surface form in text
  'lOffset': int,                       # Start character offset
  'rOffset': int,                       # End character offset
  'name': str,                          # Optional: full name (for persons)
  'title': str,                         # Optional: title (for persons)
  'function': str                       # Optional: function (if detected)
}

Coarse-Grained Entity Types:

  • pers: Person entities (individuals, collectives, authors)
  • org: Organizations (administrative, enterprise, press agencies)
  • prod: Products (media)
  • time: Time expressions (absolute dates)
  • loc: Locations (towns, regions, countries, physical, facilities)

If present in the text, surrounding an entity, model returns person-specific attributes such as:

  • name: canonical full name
  • title: honorific or title (e.g., "king", "chancellor")
  • function: role or function in context (if available)

Model Sources

Uses

Direct Use

The model is intended to be used directly with the Hugging Face pipeline for token-classification, specifically with generic-ner tasks on historical texts.

Downstream Use

Can be used for downstream tasks such as:

  • Historical information extraction
  • Biographical reconstruction
  • Place and person mention detection across historical archives

Out-of-Scope Use

  • Not suitable for contemporary named entity recognition in domains such as social media or modern news.
  • Not optimized for OCR-free modern corpora.

Bias, Risks, and Limitations

Due to training on historical documents, the model may reflect historical biases and inaccuracies. It may underperform on contemporary or non-European languages.

Recommendations

  • Users should be cautious of historical and typographical biases.
  • Consider post-processing to filter false positives from OCR noise.

How to Get Started with the Model

from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline

MODEL_NAME = "impresso-project/ner-stacked-bert-multilingual"

tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)

ner_pipeline = pipeline("generic-ner", model=MODEL_NAME, tokenizer=tokenizer, trust_remote_code=True, device='cpu')

sentence = "En l'an 1348, au plus fort des ravages de la peste noire à travers l'Europe, le Royaume de France se trouvait à la fois au bord du désespoir et face à une opportunité. À la cour du roi Philippe VI, les murs du Louvre étaient animés par les rapports sombres venus de Paris et des villes environnantes. La peste ne montrait aucun signe de répit, et le chancelier Guillaume de Nogaret, le conseiller le plus fidèle du roi, portait le lourd fardeau de gérer la survie du royaume."
entities = ner_pipeline(sentence)
print(entities)

Example Output

[
  {'type': 'time', 'confidence_ner': 85.0, 'surface': "an 1348", 'lOffset': 0, 'rOffset': 12},
  {'type': 'loc', 'confidence_ner': 90.75, 'surface': "Europe", 'lOffset': 69, 'rOffset': 75},
  {'type': 'loc', 'confidence_ner': 75.45, 'surface': "Royaume de France", 'lOffset': 80, 'rOffset': 97},
  {'type': 'pers', 'confidence_ner': 85.27, 'surface': "roi Philippe VI", 'lOffset': 181, 'rOffset': 196, 'title': "roi", 'name': "roi Philippe VI"},
  {'type': 'loc', 'confidence_ner': 30.59, 'surface': "Louvre", 'lOffset': 210, 'rOffset': 216},
  {'type': 'loc', 'confidence_ner': 94.46, 'surface': "Paris", 'lOffset': 266, 'rOffset': 271},
  {'type': 'pers', 'confidence_ner': 96.1, 'surface': "chancelier Guillaume de Nogaret", 'lOffset': 350, 'rOffset': 381, 'title': "chancelier", 'name': "Guillaume de Nogaret"},
  {'type': 'loc', 'confidence_ner': 49.35, 'surface': "Royaume", 'lOffset': 80, 'rOffset': 87},
  {'type': 'loc', 'confidence_ner': 24.18, 'surface': "France", 'lOffset': 91, 'rOffset': 97}
]

Citation

BibTeX:

@inproceedings{boros2020alleviating,
  title={Alleviating digitization errors in named entity recognition for historical documents},
  author={Boros, Emanuela and Hamdi, Ahmed and Pontes, Elvys Linhares and Cabrera-Diego, Luis-Adri{\'a}n and Moreno, Jose G and Sidere, Nicolas and Doucet, Antoine},
  booktitle={Proceedings of the 24th conference on computational natural language learning},
  pages={431--441},
  year={2020}
}

Contact

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

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

0 моделей