
hebrew-nlp-toolkit
Guide developers in using Hebrew NLP models and tools including DictaLM, DictaBERT, AlephBERT, and ivrit.ai. Use when user asks about Hebrew text processing, Hebrew NLP, "ivrit", Hebrew tokenization, Hebrew NER, Hebrew sentiment analysis, Hebrew speech-to-text, or needs to process Hebrew language text programmatically. Covers model selection, preprocessing, and Hebrew-specific NLP challenges. Do NOT use for Arabic NLP (different tools) or general English NLP tasks.
- Installs
- 40
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/skills-il/localization --skill hebrew-nlp-toolkit- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads hebrew-nlp-toolkit automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Hebrew NLP Toolkit
Instructions
Step 1: Identify the NLP Task
| Task | Recommended Model | HuggingFace ID | Size | Notes |
|---|---|---|---|---|
| Text generation (large) | DictaLM 3.0 24B Base | dicta-il/DictaLM-3.0-24B-Base | 24B | Best Hebrew generation, built on Mistral-Small-3.1-24B. Apache-2.0 |
| Text generation (small) | DictaLM 3.0 Nemotron Instruct | dicta-il/DictaLM-3.0-Nemotron-12B-Instruct | 12B | Instruction-tuned. NVIDIA Open Model License, not Apache |
| Reasoning / chain-of-thought | DictaLM 3.0 24B Thinking | dicta-il/DictaLM-3.0-24B-Thinking | 24B | Emits explicit thinking blocks before answering |
| Lightweight / edge | DictaLM 3.0 1.7B Thinking (GGUF) | dicta-il/DictaLM-3.0-1.7B-Thinking-GGUF | 1.7B | Runs on laptop / CPU via llama.cpp |
| Classification / fill-mask | DictaBERT | dicta-il/dictabert | 184M | Base model, fine-tune for classification |
| NER | DictaBERT NER | dicta-il/dictabert-ner | 184M | 13 entity types incl. PER, ORG, LOC, GPE, FAC, TIMEX, TTL |
| Sentiment | DictaBERT Sentiment | dicta-il/dictabert-sentiment | 184M | Works out of the box, returns Positive / Negative / Neutral style labels |
| Morphology / segmentation | DictaBERT Joint | dicta-il/dictabert-joint | 184M | Prefix segmentation, POS, lemma, dependency parse |
| Hebrew QA | DictaBERT HeQ | dicta-il/dictabert-heq | 184M | Extractive question answering |
| Embeddings (modern) | NeoDictaBERT Bilingual Embed | dicta-il/neodictabert-bilingual-embed | ~363M | Hebrew-English sentence embeddings, 768 dimensions |
| Embeddings (legacy) | AlephBERT | onlplab/alephbert-base | BERT-base | Older baseline for similarity |
| Speech-to-text | ivrit.ai Whisper v3 | ivrit-ai/whisper-large-v3 | 1.55B | Trained on about 5,000 hours drawn from the ivrit.ai corpus (Knesset plenums, crowd transcriptions, recitals) |
| Speech-to-text (fast) | ivrit.ai Whisper v3 Turbo CT2 | ivrit-ai/whisper-large-v3-turbo-ct2 | 809M | CTranslate2 build for faster-whisper |
The full ivrit.ai Hebrew audio corpus is over 22,000 hours. Each checkpoint lists its own training data on its model card, and the numbers differ: whisper-large-v3 lists about 5,000 hours, while the turbo-ct2 build lists 295 hours of crowd transcriptions plus 93 hours of professionally transcribed speech from other sources.
Several of these models ship custom code and need trust_remote_code=True (Nemotron, dictabert-joint, dictabert-large-char-menaked, neodictabert-bilingual-embed). That flag runs Python from the model repo on your machine, so read the model card and pin a revision in production.
Step 2: Install, Load and Run
Sentiment (ready to use, no fine-tuning):
from transformers import pipeline
oracle = pipeline('sentiment-analysis', model='dicta-il/dictabert-sentiment')
print(oracle(['אני אוהב את השירות']))
NER (grouped entities):
from transformers import pipeline
from tokenizers.decoders import WordPiece
oracle = pipeline('ner', model='dicta-il/dictabert-ner', aggregation_strategy='simple')
# with aggregation_strategy='simple' the tokenizer needs a decoder, per the model card
oracle.tokenizer.backend_tokenizer.decoder = WordPiece()
print(oracle('דוד בן-גוריון נולד בפולין'))
Without the decoder line, grouped entities come back as broken ## word-piece fragments.
DictaBERT (base model, fill-mask):
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictabert")
model = AutoModelForMaskedLM.from_pretrained("dicta-il/dictabert")
dicta-il/dictabert is a masked-LM base with NO classification head. Do not load it with AutoModelForSequenceClassification and run inference, that instantiates a randomly-initialised head and returns meaningless predictions. For classification, fine-tune it on labeled data first, or use a ready task-specific model such as dicta-il/dictabert-sentiment or dicta-il/dictabert-ner.
Morphology and prefix segmentation (dictabert-joint):
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('dicta-il/dictabert-joint')
model = AutoModel.from_pretrained('dicta-il/dictabert-joint', trust_remote_code=True)
model.eval()
print(model.predict(['ובבית הספר למדנו'], tokenizer, output_style='json'))
Sentence embeddings (NeoDictaBERT):
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("dicta-il/neodictabert-bilingual-embed", trust_remote_code=True)
query_embeddings = model.encode_query(["query: מתכון לעוגת שוקולד"])
document_embeddings = model.encode_document(["עוגת שוקולד פשוטה בעשר דקות"])
Keep the query: prefix on queries as the model card shows; dropping it degrades retrieval.
DictaLM 3.0 (generation, 12B instruct):
from transformers import pipeline
generator = pipeline('text-generation', model="dicta-il/DictaLM-3.0-Nemotron-12B-Instruct", trust_remote_code=True)
For serving, the model card recommends vLLM (vllm serve dicta-il/DictaLM-3.0-Nemotron-12B-Instruct --enable-auto-tool-choice --tool-call-parser hermes --trust-remote-code). For the strongest quality, and an Apache-2.0 license, use dicta-il/DictaLM-3.0-24B-Base. For reasoning tasks, use dicta-il/DictaLM-3.0-24B-Thinking, which writes its chain of thought inside an explicit thinking block before the final answer.
ivrit.ai Whisper (speech-to-text, faster-whisper):
import faster_whisper
model = faster_whisper.WhisperModel('ivrit-ai/whisper-large-v3-turbo-ct2')
segs, _ = model.transcribe('media-file', language='he')
print(' '.join(s.text for s in segs))
segs is a generator, so transcription only runs when you iterate it. On CPU pass device="cpu", compute_type="int8"; vad_filter=True skips silence, and word_timestamps=True gives per-word timing for subtitles. To use plain transformers instead, load ivrit-ai/whisper-large-v3 with pipeline("automatic-speech-recognition", ...) and generate_kwargs={"language": "he"}.
Step 3: Hebrew Text Preprocessing
Before feeding text to models:
- Normalize: Remove extra whitespace, normalize Unicode (NFC)
- Handle niqqud: Remove diacritics unless specifically needed
- Handle English: Decide whether to keep, translate, or mark English tokens
- Tokenization: DictaBERT and AlephBERT tokenizers split words into WordPiece sub-units, not morphemes. If you need real prefix segmentation (for search indexing, counting, lemmas) run
dictabert-jointfrom Step 2
import re
import unicodedata
def preprocess_hebrew(text):
# Normalize Unicode
text = unicodedata.normalize('NFC', text)
# Remove niqqud and cantillation, but keep maqaf U+05BE and other punctuation in the block
text = re.sub(r'[֑-ׇֽֿׁׂׅׄ]', '', text)
# Normalize whitespace
text = re.sub(r'\s+', ' ', text).strip()
return text
Stripping the whole U+0591 to U+05C7 range is a common bug: it deletes the maqaf and fuses hyphenated words (עולם־גדול becomes עולםגדול).
Step 4: Nikud Restoration (Diacritization)
The preprocessing above removes nikud. The opposite task, adding nikud back to unvocalized text, is called diacritization and is its own core Hebrew NLP problem (useful for text-to-speech, language learning, and disambiguation).
Dicta's Nakdan is the standard tool. The character-level model is published on HuggingFace:
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('dicta-il/dictabert-large-char-menaked')
model = AutoModel.from_pretrained('dicta-il/dictabert-large-char-menaked', trust_remote_code=True)
model.eval()
# predict takes a list of sentences and returns a list of vocalized sentences
vocalized = model.predict(['שלום עולם'], tokenizer)
Notes:
trust_remote_code=Trueis required because the model ships a custompredicthead. Review the model card before enabling it.- The model card says it targets modern Hebrew prose and is not intended for Biblical, Rabbinic, premodern or poetic texts.
- Diacritization is ambiguous: the same consonantal text can have multiple valid vocalizations depending on context. Treat output as a best guess, not ground truth.
- For full sentence-level vocalization with morphological context, Dicta's hosted Nakdan (see Step 5) generally outperforms a raw character model.
Step 5: Hosted Dicta REST APIs
If you do not want to run models locally, Dicta exposes its tools (Nakdan, morphology, and more) as hosted web services. This suits low-volume use, prototyping, or environments without a GPU.
- Nakdan (diacritization): https://nakdan.dicta.org.il/
- Developer access and API details: https://dicta.org.il/developers
Verify the current endpoint shape, request format, rate limits, and terms of use on the developer page before integrating, as hosted API contracts change. Do not assume an endpoint URL or payload schema, consult the official developer docs.
Step 6: Alternative NLP Entry Points
Dicta and ivrit.ai are the primary Hebrew-specific stacks, but two general NLP frameworks also ship Hebrew pipelines:
- HebSpacy (https://github.com/8400TheHealthNetwork/HebSpacy): a spaCy pipeline whose published model,
he_ner_news_trf, is an AlephBERT-based NER model with 16 entity types. It does not ship POS tagging or lemmatization. Good when you already use spaCy and need Hebrew NER. Check the repository's last commit date and pin your spaCy version before adopting it. - Stanza (https://stanfordnlp.github.io/stanza/): Stanford's NLP toolkit ships a Hebrew model with tokenization, morphology, lemmatization, and dependency parsing. Good for academic / cross-lingual pipelines.
For best Hebrew accuracy, Dicta models still lead. Use these frameworks when integration convenience outweighs raw quality.
Step 7: Handle Hebrew-Specific Challenges
- Morphological analysis: Use
dictabert-joint(or Dicta's hosted tools) for accurate word segmentation - No capital letters: Hebrew has no upper/lowercase distinction -- NER is harder
- Right-to-left in code: Ensure proper bidi handling in string operations
- Mixed Hebrew-English: Common in tech text, may need separate processing
- Licenses differ per model: DictaBERT models are CC-BY-4.0, DictaLM 24B is Apache-2.0, the Nemotron 12B variant is under the NVIDIA Open Model License. Check before shipping commercially
Examples
Example 1: Hebrew Text Classification
User says: "I need to classify Hebrew customer reviews as positive or negative"
Result: Run dicta-il/dictabert-sentiment through the sentiment-analysis pipeline first (it works without training). Fine-tune it on labeled domain reviews only if its accuracy on a sample of your data is not good enough.
Example 2: Hebrew Named Entity Recognition
User says: "Extract company and person names from Hebrew articles"
Result: Use the dicta-il/dictabert-ner pipeline with aggregation_strategy='simple' and the WordPiece decoder, then keep the ORG and PER entities.
Example 3: Transcribe a Hebrew Recording
User says: "Transcribe a one-hour Hebrew podcast to text"
Result: Use faster-whisper with ivrit-ai/whisper-large-v3-turbo-ct2, language='he', and vad_filter=True; iterate the segments generator and write each segment's text with its timestamps.
Bundled Resources
Scripts
scripts/preprocess_hebrew.py: Normalize Hebrew text before feeding it to NLP models (DictaBERT, DictaLM, AlephBERT). Handles Unicode NFC normalization, niqqud removal (keeping the maqaf), whitespace cleanup, URL stripping, thousands-separator and shekel-abbreviation normalization, and mixed Hebrew-English text segmentation. Run:python scripts/preprocess_hebrew.py --help
References
references/model-comparison.md: Side-by-side comparison of Hebrew NLP models (DictaLM 3.0, DictaBERT, AlephBERT, NeoDictaBERT, ivrit.ai Whisper) with VRAM requirements, HuggingFace IDs, licenses, and a task-to-model mapping table. Consult when choosing which model to use for a specific Hebrew NLP task.
Reference Links
| Source | URL | What to Check |
|---|---|---|
| DICTA Israel Center for Text Analysis (HuggingFace) | https://huggingface.co/dicta-il | Latest DictaLM and DictaBERT model variants, IDs, licenses |
| ivrit.ai (HuggingFace) | https://huggingface.co/ivrit-ai | Current Whisper fine-tunes for Hebrew ASR, dataset versions |
| AlephBERT on HuggingFace | https://huggingface.co/onlplab/alephbert-base | AlephBERT model card and usage |
| ivrit.ai project site | https://www.ivrit.ai/en/ivrit-ai-2/ | Corpus size, license |
| NNLP-IL (Israeli NLP community) | https://github.com/NNLP-IL | Curated list of Hebrew NLP resources and benchmarks |
| DictaLM 3.0 Technical Report (Dicta) | https://dicta.org.il/publications/DictaLM_3_0___Techincal_Report.pdf | Architecture, base-model lineage, training data, eval results |
| Dicta Nakdan (diacritization) | https://nakdan.dicta.org.il/ | Hosted nikud restoration tool |
| Dicta developer access | https://dicta.org.il/developers | Hosted REST API details and terms |
| faster-whisper | https://github.com/SYSTRAN/faster-whisper | WhisperModel, compute_type, VAD and word timestamps |
| Stanza (Hebrew model) | https://stanfordnlp.github.io/stanza/ | Hebrew tokenization, morphology, parsing |
Gotchas
- Hebrew has no capital letters, so agents cannot use capitalization-based NER (Named Entity Recognition) heuristics that work for English. Hebrew NER requires morphological analysis or trained models.
- Hebrew words can be prefixed with multiple particles (prepositions, conjunctions, articles) that are written as part of the word. The string "ובבית" (u-va-bayit) is "and in the house" as a single token. Agents may treat it as one word.
- The Hebrew letter system has five final forms (sofit): kaf, mem, nun, pe, tsadi. Agents may normalize these to their non-final forms, breaking word matching and search.
- Nikud (vowel diacritics) is almost never present in modern Hebrew text. Agents trained on nikud-annotated text may fail on standard unvocalized Hebrew. Always design for nikud-less input.
- Agents often "normalize" the shekel abbreviation with a plain substring replace of ש and ח, which also rewrites ordinary words such as שחר and משחק. Match it only as a standalone token.
Troubleshooting
Error: "Tokens look like fragments with ## in them"
Cause: DictaBERT and AlephBERT use WordPiece tokenization, which splits rare words into sub-word pieces. These are not morphemes.
Solution: For NER, set aggregation_strategy='simple' plus the WordPiece decoder shown in Step 2. For real prefix segmentation, use dictabert-joint.
Error: "GPU out of memory"
Cause: in BF16 the weights alone take about 2 bytes per parameter, so roughly 48GB for DictaLM 3.0 24B and roughly 24GB for the Nemotron-12B variant, before KV cache and activations.
Solution: Drop to dicta-il/DictaLM-3.0-Nemotron-12B-Instruct (12B), the 1.7B Thinking GGUF variant, or use the FP8 / W4A16 quantized checkpoints published under the same org (e.g., DictaLM-3.0-24B-Base-FP8). For laptop-class hardware, run a GGUF build via llama.cpp.
FAQ
What does the hebrew-nlp-toolkit skill do?
Guide developers in using Hebrew NLP models and tools including DictaLM, DictaBERT, AlephBERT, and ivrit.ai. Use when user asks about Hebrew text processing, Hebrew NLP, "ivrit", Hebrew tokenization, Hebrew NER, Hebrew sentiment analysis, Hebrew speech-to-text, or needs to process Hebrew language text programmatically. Covers model selection, preprocessing, and Hebrew-specific NLP challenges. Do NOT use for Arabic NLP (different tools) or general English NLP tasks.
How do I install hebrew-nlp-toolkit?
Run npx skills add https://github.com/skills-il/localization --skill hebrew-nlp-toolkit in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/hebrew-nlp-toolkit/ (personal) or .claude/skills/hebrew-nlp-toolkit/ (project).
Which AI agents can use hebrew-nlp-toolkit?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is hebrew-nlp-toolkit safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains hebrew-nlp-toolkit?
It is published by skills-il in skills-il/localization. It has 40 recorded installs.
More from skills-il/localization
hebrew-rtl-best-practices
skills-il/localization
Implement right-to-left (RTL) layouts for Hebrew web applications. Use when user asks about RTL layout, Hebrew text direction, bidirectional (bidi) text, Hebrew CSS, "right to left", or needs to build a Hebrew web UI. Covers CSS logical properties, the :dir() pseudo-class, Tailwind RTL, React/Next.js RTL setup, icon mirroring, Hebrew typography, and font selection. Do NOT use for Arabic RTL (similar but different typography) unless user explicitly asks for shared RTL patterns, or for native mobile RTL (React Native I18nManager, SwiftUI, Android) which is out of scope.
hebrew-content-writer
skills-il/localization
Open the skill to read its SKILL.md instructions.
israeli-accessibility-compliance
skills-il/localization
Open the skill to read its SKILL.md instructions.
hebrew-document-generator
skills-il/localization
Not legal advice. Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct RTL layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use whenever the output is a Hebrew or mixed Hebrew/English Word document, Hebrew PDF, or Hebrew PowerPoint ("Hebrew Word document", "מסמך Word בעברית", "create a .docx in Hebrew"), or Israeli templates like Heshbonit Mas, Hozeh, or Protokol. ALSO use this for the symptom where a Hebrew document looks fine on screen or in Claude but comes out scrambled, reversed, or broken in Word, with English, numbers, or punctuation on the wrong side ("Hebrew text reversed in Word", "fix Hebrew formatting in Word"); the fix is regenerating the .docx with paragraph-level RTL/bidi, NOT a web/CSS RTL change. Prefer over the generic docx/pdf skills ONLY when the document is Hebrew or RTL; for English-only docs use the generic skill. Covers reportlab, WeasyPrint, python-docx, pptxgenjs. Do NOT use for OCR or reading existing documents (use hebrew-ocr-f
hebrew-tailwind-preset
skills-il/localization
Open the skill to read its SKILL.md instructions.
shabbat-aware-scheduler
skills-il/localization
Open the skill to read its SKILL.md instructions.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image