Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
Hebrew
License:
wordlist / README.md
ChuckLind's picture
Release v1.1.5: fix passive-participle lemmas (default config) (#9)
17444d3
|
Raw History Blame Contribute Delete
16.7 kB
metadata
language:
  - he
license: cc-by-nc-4.0
pretty_name: Dicta Unvocalized Hebrew Wordlist
size_categories:
  - 1M<n<10M
tags:
  - hebrew
  - lexicon
  - morphology
  - wordlist
configs:
  - config_name: default
    data_files:
      - split: train
        path: wordlist-v1.1.5.parquet
  - config_name: attested
    data_files:
      - split: train
        path: attested-wordlist-v1.0.0.parquet
dataset_info:
  - config_name: default
    features:
      - name: id
        dtype: int64
      - name: lemma_id
        dtype: int64
      - name: word
        dtype: string
      - name: haser
        dtype: string
      - name: maleh_forms
        list: string
      - name: lex
        dtype: string
      - name: lex_maleh
        dtype: string
      - name: root
        dtype: string
      - name: pos
        dtype:
          class_label:
            names:
              '0': ADJECTIVE
              '1': ADVERB
              '2': AT_PREP
              '3': CONJUNCTION
              '4': COPULA
              '5': EXISTENTIAL
              '6': INTERJECTION
              '7': INTERROGATIVE
              '8': NEGATION
              '9': NOUN
              '10': NUMERAL
              '11': PARTICIPLE
              '12': PREFIX
              '13': PREPOSITION
              '14': PRONOUN
              '15': PROPERNAME
              '16': QUANTIFIER
              '17': SHEL_PREP
              '18': TITULAR
              '19': VERB
      - name: binyan
        dtype:
          class_label:
            names:
              '0': HIFIL
              '1': HITPAEL
              '2': HUFAL
              '3': NIFAL
              '4': PAAL
              '5': PIEL
              '6': PUAL
      - name: gender
        dtype:
          class_label:
            names:
              '0': FEMININE
              '1': MASCULINE
              '2': MASCULINEFEMININE
      - name: number
        dtype:
          class_label:
            names:
              '0': DUAL
              '1': PLURAL
              '2': SINGULAR
              '3': SINGULARPLURAL
      - name: person
        dtype:
          class_label:
            names:
              '0': '1'
              '1': '2'
              '2': '3'
              '3': ANY
      - name: tense
        dtype:
          class_label:
            names:
              '0': BAREINFINITIVE
              '1': FUTURE
              '2': IMPERATIVE
              '3': PAST
              '4': PRESENT
              '5': TOINFINITIVE
      - name: status
        dtype:
          class_label:
            names:
              '0': ABSOLUTE
              '1': ABSOLUTECONSTRUCT
              '2': CONSTRUCT
      - name: suffix_function
        dtype:
          class_label:
            names:
              '0': ACCUSATIVENOMINATIVE
              '1': POSSESIVEPRONOUN
      - name: suffix_gender
        dtype:
          class_label:
            names:
              '0': FEMININE
              '1': MASCULINE
              '2': MASCULINEFEMININE
      - name: suffix_number
        dtype:
          class_label:
            names:
              '0': PLURAL
              '1': SINGULAR
      - name: suffix_person
        dtype:
          class_label:
            names:
              '0': '1'
              '1': '2'
              '2': '3'
      - name: shortened_form
        dtype: bool
      - name: inversive_vav
        dtype: bool
      - name: extended_form
        dtype: bool
      - name: poetry
        dtype: bool
      - name: aramaic
        dtype: bool
      - name: pre_modern_form
        dtype: bool
      - name: loazi_word
        dtype: bool
      - name: passive
        dtype: bool
      - name: tanakh
        dtype: bool
    splits:
      - name: train
        num_examples: 4066087
  - config_name: attested
    features:
      - name: wordform
        dtype: string
      - name: prefix
        dtype: string
      - name: pos
        dtype:
          class_label:
            names:
              '0': ADJECTIVE
              '1': ADVERB
              '2': AT_PREP
              '3': CONJUNCTION
              '4': COPULA
              '5': EXISTENTIAL
              '6': INTERJECTION
              '7': INTERROGATIVE
              '8': NEGATION
              '9': NOUN
              '10': NUMERAL
              '11': PARTICIPLE
              '12': PREFIX
              '13': PREPOSITION
              '14': PRONOUN
              '15': PROPERNAME
              '16': QUANTIFIER
              '17': SHEL_PREP
              '18': TITULAR
              '19': VERB
              '20': INITIALISM
      - name: binyan
        dtype:
          class_label:
            names:
              '0': HIFIL
              '1': HITPAEL
              '2': HUFAL
              '3': NIFAL
              '4': PAAL
              '5': PIEL
              '6': PUAL
      - name: gender
        dtype:
          class_label:
            names:
              '0': FEMININE
              '1': MASCULINE
              '2': MASCULINEFEMININE
      - name: number
        dtype:
          class_label:
            names:
              '0': DUAL
              '1': PLURAL
              '2': SINGULAR
              '3': SINGULARPLURAL
      - name: person
        dtype:
          class_label:
            names:
              '0': '1'
              '1': '2'
              '2': '3'
              '3': ANY
      - name: tense
        dtype:
          class_label:
            names:
              '0': BAREINFINITIVE
              '1': FUTURE
              '2': IMPERATIVE
              '3': PAST
              '4': PRESENT
              '5': TOINFINITIVE
      - name: status
        dtype:
          class_label:
            names:
              '0': ABSOLUTE
              '1': ABSOLUTECONSTRUCT
              '2': CONSTRUCT
      - name: suffix_function
        dtype:
          class_label:
            names:
              '0': ACCUSATIVENOMINATIVE
              '1': POSSESIVEPRONOUN
      - name: suffix_gender
        dtype:
          class_label:
            names:
              '0': FEMININE
              '1': MASCULINE
              '2': MASCULINEFEMININE
      - name: suffix_number
        dtype:
          class_label:
            names:
              '0': PLURAL
              '1': SINGULAR
      - name: suffix_person
        dtype:
          class_label:
            names:
              '0': '1'
              '1': '2'
              '2': '3'
      - name: genres
        sequence:
          class_label:
            names:
              '0': Modern
              '1': Rabbinic
              '2': Talmud
              '3': ModernPoetry
              '4': MedievalPoetry
    splits:
      - name: train
        num_examples: 695870

Dicta Unvocalized Hebrew Wordlist

Every distinct unvocalized (nikud-stripped) Hebrew word form Dicta knows, with its morphology, lemma, and root. There is no compact natural key: rows are distinguished only by the full combination of word + lex + morphology + root + the linguistic flags. Use id as the row key.

This repo has two configs:

  • default — the full wordlist below (every theoretically valid word-object).
  • attested — wordforms actually observed in Dicta corpora, with the prefix and the genres they were seen in. See Attested wordforms.

Loading

from datasets import load_dataset
ds = load_dataset("dicta-il/wordlist", "default", split="train")   # or "attested"
# every categorical column loads as a ClassLabel (int codes); .int2str decodes any of them:
ds.features["pos"].int2str(ds[0]["pos"])   # -> e.g. "VERB"; same for binyan, gender, tense, ...

Columns

column type notes
id int per-row id
lemma_id int one per unique vocalized lex (rows sharing a lemma share it)
word string the word's most common full spelling, with matres lectionis (maleh). Not unique — rows can share a word with different lemma/morphology
haser string? defective (haser) spelling — without matres lectionis — if distinct
maleh_forms list[string] additional maleh spellings (with matres lectionis) believed to be in use, if any
lex string vocalized lemma (dictionary form)
lex_maleh string unvocalized maleh spelling of the lemma
root string? consonantal root
pos ClassLabel part of speech
binyan ClassLabel verb stem
gender, number, person, tense, status ClassLabel inflectional morphology
suffix_function, suffix_gender, suffix_number, suffix_person ClassLabel pronominal suffix, null if none
shortened_form, inversive_vav, extended_form, poetry, aramaic, pre_modern_form, loazi_word, passive, tanakh bool linguistic flags

Categorical columns are ClassLabel: the Parquet stores integer codes and the label names live in the file's feature metadata (recovered automatically by datasets).

Label glossary (non-obvious values)

  • pos: SHEL_PREP = של and inflections thereof; AT_PREP = את and inflections thereof; TITULAR = title (e.g. ר', מר).
  • person / suffix_person: ANY = unspecified person.
  • gender: MASCULINEFEMININE = either.
  • status: ABSOLUTECONSTRUCT = form valid as both absolute and construct.
  • suffix_function: POSSESIVEPRONOUN (possessive) vs ACCUSATIVENOMINATIVE (object/subject clitic). Note: tagging of function words that carry suffixes is inconsistent.

Attested wordforms (attested config)

Where the default config lists every theoretically valid word-object Dicta knows, the attested config lists wordform+morphologies believed by Dicta to actually exist in the wild with some frequency. Each row is a distinct (wordform, prefix, morphology) seen or tagged in at least one corpus, across five genres.

from datasets import load_dataset
ds = load_dataset("dicta-il/wordlist", "attested", split="train")
ds.features["pos"].int2str(ds[0]["pos"])    # same for binyan, gender, etc.
ds.features["genres"].feature.int2str(ds[0]["genres"])   # genres is a list of ClassLabels
column type notes
wordform string the attested unvocalized spelling, with the prefix removed
prefix string the attached prefix letters (empty if none)
pos ClassLabel part of speech — includes INITIALISM, which the default table does not
binyan, gender, number, person, tense, status ClassLabel inflectional morphology
suffix_function, suffix_gender, suffix_number, suffix_person ClassLabel pronominal suffix, null if none
genres list[ClassLabel] genres the form was attested in: Modern, Rabbinic, Talmud, ModernPoetry, MedievalPoetry

Notes:

  • No lemma/haser/maleh columns: those are word-object facts, not observations. To recover them, join back to the default config — but note a wordform is any spelling of a word-object, so it may appear in the default config's word, haser, or maleh_forms. Match against all three (e.g. wordform IN (word, haser) or wordform a member of maleh_forms), plus morphology.
  • wordform is ~99% a subset of the default table's known spellings (word/haser/maleh_forms); the residual is mostly out-of-wordlist POS (e.g. INITIALISM), some classes that are too productive to capture in a list (Internet-style spellings, names of years, etc.), and a few of what appear to be tagging errors.

Prefix-aware lookup (helper script)

The wordlist has no prefixes — every row is a bare word. Hebrew, though, attaches prefix letters (ו, ה, ש, ב, כ, ל, מ, and clusters like כש, וה) directly onto a word. To look up a surface form that may carry a prefix, this repo ships a helper that splits the form into a prefix + a wordlist row, keeps only prefixes grammatically allowed to attach to that row (e.g. the definite article ה attaches to an adjective but not to a past-tense verb), and ranks the readings by likelihood.

Two files drive it: wordlist_query.py (the logic) and prefix-table.json (valid prefixes, their grammatical functions, and per-genre rarity). Fetch and import them from the repo — load_dataset alone won't run the script:

from huggingface_hub import hf_hub_download
import importlib.util

path = hf_hub_download("dicta-il/wordlist", "wordlist_query.py", repo_type="dataset")
spec = importlib.util.spec_from_file_location("wq", path)
wq = importlib.util.module_from_spec(spec); spec.loader.exec_module(wq)

q = wq.WordlistQuery(genre="Modern")     # see the cost note below; prints progress (verbose=False to mute)
for m in q.get_word_options("הגדול"):     # "the big (one)" — ranked, most likely first
    print(m.prefix, m.function, m.row["word"], m.row["lex"], m.row["pos"], m.morph_anchor)
# top result: ה {'def': True, ...} גדול גָּדוֹל ADJECTIVE True
# the ה-interrogative reading of the same word, and verb readings, rank below it

Cost & reuse: the first WordlistQuery(...) downloads the two parquets once (cached by huggingface_hub) and builds an in-memory index over the ~4M-row default config. This one-time build will likely take a few minutes and a couple of GB of RAM. Queries afterward are instant. The rows stay in the memory-mapped Arrow table and are materialized on demand, so build one WordlistQuery and reuse it for the life of the process rather than reconstructing it per query.

Memory modes. The default holds the index in memory for instant queries. For less RAM, pass WordlistQuery(low_memory=True) to skip that build and scan the memory-mapped data per query instead — resident RAM stays near the mmap baseline (tens of MB) and startup is near-instant, at about 1s per query; good for a long-running GUI or a memory-constrained machine. Or pass WordlistQuery(disk=True) for the middle ground: a one-time build of a persistent indexed file (500 MB, written to wordlist-index.duckdb in the working directory — pass disk="/path/to/index.duckdb" to place it elsewhere), then fast index-seek queries (~tens of ms) at that same low footprint. The file is rebuilt automatically when a new release changes the data; note the one-time build peaks above the steady-state footprint (it is not itself a low-memory operation). Call .close() to release the file handle when done (needed on Windows before an in-process rebuild).

Each result is a Match(prefix, wordform, function, row, morph_anchor, spelling, anchor_genres):

  • prefix — the attached prefix letters ("" if none).
  • wordform — the queried spelling that matched (may be the row's word, haser, or a maleh_forms member).
  • function — the single prefix function this reading uses (None when there's no prefix). One result is emitted per prefix function, so ה-definite and ה-interrogative are ranked separately.
  • row — the matched default-config row as a dict: every scalar column (id, lemma_id, word, haser, maleh_forms, lex, lex_maleh, root, and all the linguistic flags — tanakh, inversive_vav, poetry, aramaic, pre_modern_form, shortened_form, extended_form, loazi_word, passive) plus morph (the categorical morphology as a named tuple). row["id"] is the key back into the default config for anything you need to re-derive.
  • morph_anchor — whether this exact morphology was attested for (wordform, prefix) in the target genre (from the attested config). This is the strongest ranking signal.
  • spelling — a Spelling enum saying which column of the default table the wordform came from, i.e. how expected this unvocalized spelling is for that morphology: real_maleh (the primary word), haser (the defective spelling), or alt_maleh (an alternate maleh_forms spelling). Anything other than real_maleh indicates that it's generally an unlikely spelling to find in unvocalized modern text.
  • anchor_genres — the set of all genres this (wordform, prefix, morphology) was attested in (Modern / Rabbinic / Talmud / ModernPoetry / MedievalPoetry). morph_anchor is just whether the query genre is in this set; the set shows the full cross-genre picture (e.g. a form attested only in Talmud reads {Talmud} and is not a Modern anchor).

Requires only datasets + huggingface_hub. Results are ordered by a priority hierarchy: attested morphology first, then non-interrogative readings, non-poetry, non-pre-modern, non-Tanakh-only (proper names excepted), maleh spelling over haser, and common over rare verb/prefix forms.

Maintainers: label stability (read before updating)

Categorical columns are ClassLabel, and each integer code is the position of its name in the label list. When regenerating or extending this dataset — by any means — you must only append new label values at the end. Never reorder or insert: doing so silently remaps existing codes and breaks every consumer that compares against integers across versions. (This is why the attested config's pos has INITIALISM appended at index 20, after the default config's 20 values.)

See CHANGELOG.md for version history.