/ Модель

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

Лицензия
MIT
Архитектура
hebrew-lemmatizer · dense
Библиотека
shoshan
Опубликована
18 июн 2026

shoshan

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

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

27скачиваний за 30 дней0лайковвеса обновлены2 сен 2026

Бенчмарки

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

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

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

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

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

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

Shoshan — это контекстный лемматизатор иврита, разработанный HebArabNlpProject. Модель дообучена на основе DictaBERT и размечает слова, выбирая лемму из банка примерно из 117,6 тыс. вариантов; если выбранная лемма морфологически неправдоподобна для исходной формы, модель применяет ограниченное преобразование по выученному скрипту правок. Она не генерирует произвольные строки.

Модель предназначена для лемматизации предложений и документов на иврите, в том числе текста, извлечённого из PDF. Согласно README, точность лемматизации составляет 92,4% на данных вне обучающей области и 94,3% внутри неё. Обновление Shoshan 0.4.0 исправило обработку Unicode presentation forms и смещения символьных диапазонов; веса при этом не менялись. Модель обучена на открытых частях корпуса IAHLT Hebrew UD Treebank (Knesset и Wikipedia) и публичных ивритских лексиконах. Лицензия — MIT.

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

  • лемматизация слов в предложениях на иврите
  • нормализация словоформ в ивритских документах
  • лемматизация текста на иврите, извлечённого из PDF
  • подготовка ивритского текста для поиска и индексирования

Ограничения

Качество может снижаться на текстах и регистрах, отличающихся от обучающих данных. Модель ограничена леммами из фиксированного банка и bounded edit-преобразованиями; при обработке ненормализованного Unicode символьные смещения могут изменяться.

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

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

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

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

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

Открыть на Hugging Face

Shoshan — Hebrew lemmatizer (weights)

A context-aware Hebrew lemmatizer that does not hallucinate. It retrieves the lemma from a fixed bank, and when the top retrieval is morphologically implausible for the surface form, transduces it with a learned, form-relative edit script. Every output is a real bank entry or a bounded edit of the input word, so the model cannot emit a free-form string.

Trained only on the openly redistributable Knesset + Wikipedia portions of the IAHLT Hebrew UD treebank, plus public Hebrew lexicons.

Contents

folderwhat
model/the fine-tuned encoder (DictaBERT backbone) + POS head + edit-script head and inventory
bank/the pre-encoded lemma bank (lemmas.csv + lemmas.npy, ~117.6k lemmas)

The bank is normalized to a single undotted, quote-folded form per lemma (so vowel-only variants can't produce arbitrary retrieval ties) and filtered to valid Hebrew lemmas. Inference encodes each sentence once and pools every token from it, so document lemmatization scales with the number of sentences, not tokens.

Usage

pip install shoshan
from shoshan import Lemmatizer

lz = Lemmatizer.from_pretrained()        # pulls these weights, then caches
lz.lemma("המחברות", "המורה חילקה את המחברות לתלמידים בכיתה.")   # -> מחברת

shoshan 0.4.0 — update the software, not the weights

These weights are unchanged; nothing here needs re-downloading. 0.4.0 fixes the text handling around the model, so the same weights now see your text as you wrote it.

It matters most for text extracted from PDFs, which commonly spells Hebrew with presentation forms (U+FB1D-U+FB4F). Such a word used to be split apart before the model saw it — אנשים ("people") written with U+FB2E became נשים ("women") — and, for the width variants and the alef-lamed ligature, it also reached the encoder as a codepoint DictaBERT has never seen. Both are fixed. annotate()'s character offsets now index the string you passed in; their value changes on any input that normalization rewrites — text that is not NFC, and text containing presentation forms.

pip install -U shoshan

If you have run this model over PDF-extracted Hebrew, the affected words were lemmatized wrong rather than approximately — re-run rather than spot-check. Measured effect and the full changelog: https://github.com/ivrit/shoshan/releases/tag/v0.4.0

Results (out-of-domain, held-out registers)

  • Lemma accuracy 92.4% out-of-domain (94.3% in-domain).
  • B³ consistency leads DictaBERT-lex on both precision and recall (0.965 / 0.953 vs 0.906 / 0.932).
  • 0.0% low-overlap errors on unseen words, vs 12.3% for DictaBERT-lex (which predicts each lemma as a single token from its vocabulary).

DictaBERT-lex was trained on more data than is used here, including the domains held out for evaluation, so the comparison is conservative.

License and credit

Code: MIT. The encoder is fine-tuned from DictaBERT (dicta-il/dictabert) and is subject to that model's license. The lemma bank is derived from a public Hebrew lemma lexicon and the MILA morphological lexicon; see the code repository's docs/DATA_STATEMENT.md for provenance and terms. We thank Avner Algom and the IAHLT for the treebank data.

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

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

GPU в ailist

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

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

Архитектура hebrew-lemmatizer неизвестна transformers в образе рантайма.

Ревизия весов
c5f520f

0 моделей