CrabInHoney / morphbert-large-morpheme-segmentation-ru

huggingface.co
Total runs: 12
24-hour runs: 0
7-day runs: 0
30-day runs: -4
Model's Last Updated: May 29 2025
token-classification

Introduction of morphbert-large-morpheme-segmentation-ru

Model Details of morphbert-large-morpheme-segmentation-ru

MorphBERT-Large: Russian Morpheme Segmentation

This repository contains the CrabInHoney/morphbert-large-morpheme-segmentation-ru model, a большая transformer-based system fine-tuned for morpheme segmentation of Russian words. The model classifies each character of a given word into one of 25 morpheme categories: ['END', 'END1', 'HYPH', 'HYPH1', 'LINK', 'LINK1', 'LINK2', 'LINK3', 'POSTFIX', 'PREF', 'PREF1', 'PREF2', 'ROOT', 'ROOT1', 'ROOT2', 'ROOT3', 'ROOT4', 'ROOT5', 'SUFF', 'SUFF1', 'SUFF2', 'SUFF3', 'SUFF4', 'SUFF5', 'SUFF6']

Model Description

morphbert-large-morpheme-segmentation-ru uses the powerful transformer architecture, aimed at more accurate prediction of morphological analysis at the character level. Due to its large size, the model demonstrates greater accuracy in determining the constituent morphemes in Russian words compared to the small version (CrabInHoney/morphbert-tiny-morpheme-segmentation-ru).

The model was obtained by learning from scratch, the architecture is comparable in complexity to bert-base.

Key Features:

  • Task: Morpheme Segmentation (Token Classification at Character Level)
  • Language: Russian (ru)
  • Architecture: Transformer (BERT base -like)
  • Labels: ['END', 'END1', 'HYPH', 'HYPH1', 'LINK', 'LINK1', 'LINK2', 'LINK3', 'POSTFIX', 'PREF', 'PREF1', 'PREF2', 'ROOT', 'ROOT1', 'ROOT2', 'ROOT3', 'ROOT4', 'ROOT5', 'SUFF', 'SUFF1', 'SUFF2', 'SUFF3', 'SUFF4', 'SUFF5', 'SUFF6']

Model Size & Specifications:

  • Parameters: ~85.5 Million
  • Tensor Type: F32
  • Disk Footprint: ~342 MB
Usage

The model can be easily used with the Hugging Face transformers library. It processes words character by character.

from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch

model_name = "CrabInHoney/morphbert-large-morpheme-segmentation-ru"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
model.eval()

def analyze(word):
    tokens = list(word)
    encoded = tokenizer(tokens, is_split_into_words=True, return_tensors="pt", truncation=True, max_length=34)
    with torch.no_grad():
        logits = model(**encoded).logits
        predictions = logits.argmax(dim=-1)[0]
    
    word_ids = encoded.word_ids()
    output = []
    current_label = None
    current_chunk = []

    for i, word_idx in enumerate(word_ids):
        if word_idx is not None and word_idx < len(tokens):
            label_id = predictions[i].item()
            label = model.config.id2label[label_id]  
            token = tokens[word_idx]
            
            if label == current_label:
                current_chunk.append(token)
            else:
                if current_chunk:
                    chunk_str = "".join(current_chunk)
                    output.append(f"{chunk_str}:{current_label}")
                current_chunk = [token]
                current_label = label
    if current_chunk:
        chunk_str = "".join(current_chunk)
        output.append(f"{chunk_str}:{current_label}")

    return " / ".join(output)

# Примеры
for word in ["масляный", "предчувствий", "тарковский", "кот", "подгон", "сине-белый", "шторы", "абажур", "дедлайн", "веб-сайт", "адаптированная", "формообразующий"]:
    print(f"{word} → {analyze(word)}")
Example Predictions
масляный → масл:ROOT / ян:SUFF / ый:END
предчувствий → пред:PREF / чу:ROOT / в:SUFF / ств:SUFF1 / ий:END
тарковский → тарк:ROOT / ов:SUFF / ск:SUFF1 / ий:END
кот → кот:ROOT
подгон → под:PREF / гон:ROOT
сине-белый → син:ROOT / е:LINK / -:HYPH / бел:ROOT1 / ый:END
шторы → штор:ROOT / ы:END
абажур → абажур:ROOT
дедлайн → дедлайн:ROOT
веб-сайт → веб:ROOT / -:HYPH / сайт:ROOT1
адаптированная → адапт:ROOT / ир:SUFF / ова:SUFF1 / нн:SUFF2 / ая:END
формообразующий → форм:ROOT / о:LINK / образу:ROOT1 / ющ:SUFF / ий:END
Performance

The model achieves an approximate character-level accuracy of 0.99 on its evaluation dataset.

Limitations
  • Performance may vary on out-of-vocabulary words, neologisms, or highly complex morphological structures not sufficiently represented in the training data.
  • The model operates strictly at the character level; it does not incorporate broader lexical or syntactic context.
  • Ambiguous cases in morpheme boundaries might be resolved based on patterns learned during training, which may not always align with linguistic conventions in edge cases.

Runs of CrabInHoney morphbert-large-morpheme-segmentation-ru on huggingface.co

12
Total runs
0
24-hour runs
1
3-day runs
0
7-day runs
-4
30-day runs

More Information About morphbert-large-morpheme-segmentation-ru huggingface.co Model

More morphbert-large-morpheme-segmentation-ru license Visit here:

https://choosealicense.com/licenses/apache-2.0

morphbert-large-morpheme-segmentation-ru huggingface.co

morphbert-large-morpheme-segmentation-ru huggingface.co is an AI model on huggingface.co that provides morphbert-large-morpheme-segmentation-ru's model effect (), which can be used instantly with this CrabInHoney morphbert-large-morpheme-segmentation-ru model. huggingface.co supports a free trial of the morphbert-large-morpheme-segmentation-ru model, and also provides paid use of the morphbert-large-morpheme-segmentation-ru. Support call morphbert-large-morpheme-segmentation-ru model through api, including Node.js, Python, http.

morphbert-large-morpheme-segmentation-ru huggingface.co Url

https://huggingface.co/CrabInHoney/morphbert-large-morpheme-segmentation-ru

CrabInHoney morphbert-large-morpheme-segmentation-ru online free

morphbert-large-morpheme-segmentation-ru huggingface.co is an online trial and call api platform, which integrates morphbert-large-morpheme-segmentation-ru's modeling effects, including api services, and provides a free online trial of morphbert-large-morpheme-segmentation-ru, you can try morphbert-large-morpheme-segmentation-ru online for free by clicking the link below.

CrabInHoney morphbert-large-morpheme-segmentation-ru online free url in huggingface.co:

https://huggingface.co/CrabInHoney/morphbert-large-morpheme-segmentation-ru

morphbert-large-morpheme-segmentation-ru install

morphbert-large-morpheme-segmentation-ru is an open source model from GitHub that offers a free installation service, and any user can find morphbert-large-morpheme-segmentation-ru on GitHub to install. At the same time, huggingface.co provides the effect of morphbert-large-morpheme-segmentation-ru install, users can directly use morphbert-large-morpheme-segmentation-ru installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

morphbert-large-morpheme-segmentation-ru install url in huggingface.co:

https://huggingface.co/CrabInHoney/morphbert-large-morpheme-segmentation-ru

Url of morphbert-large-morpheme-segmentation-ru

morphbert-large-morpheme-segmentation-ru huggingface.co Url

Provider of morphbert-large-morpheme-segmentation-ru huggingface.co

CrabInHoney
ORGANIZATIONS

Other API from CrabInHoney