cstr's picture
Update README.md
79d417b verified
metadata
license: cc-by-sa-4.0
task_categories:
  - text-retrieval
language:
  - de
tags:
  - wiktionary
  - dictionary
  - german
  - linguistics
  - morphology
  - semantics
  - normalized
  - lossless
size_categories:
  - 1M<n<10M

German Wiktionary - FULL Normalized SQLite Database

This is a complete, lossless, and fully normalized SQLite database of German Wiktionary, capturing 100% of the structured data from the cstr/de-wiktionary-extracted dataset.

It is designed for production-ready applications, complex linguistic analysis, and mobile apps (Flutter, React Native) that require a comprehensive local dictionary.

🎯 Key Features

  • βœ… 100% Lossless: All 30+ top-level and nested fields from the source JSONL are preserved.
  • ⚑ Fast Queries: Fully indexed schema for sub-20ms queries.
  • πŸ”— Full Semantic Web: Includes all semantic relations (synonyms, antonyms, hypernyms, hyponyms, meronyms, holonyms, coordinate_terms).
  • πŸ—£οΈ Rich Content: Includes expressions, proverbs, and entry notes in addition to definitions and examples.
  • πŸ“± Mobile-ready: Optimized for sqflite (Flutter) and other local DB use cases.
  • (and all features from the standard DB: forms, translations, sounds, etc.)

πŸ“Š Database Statistics

  • Entries: 970,801
  • Word Senses: 3,098,364
  • Definitions (Glosses): 3,087,300
  • Translations: 1,131,251
  • Word Forms (Inflections): 6,100,090
  • Form Tags (Total): 25,966,680
  • Pronunciations (Sounds): 2,327,762
  • Usage Examples: 427,322
  • Synonyms: 161,563
  • Antonyms: 76,054
  • Hypernyms: 133,059
  • Hyponyms: 217,179
  • Proverbs: 1,078
  • Expressions: 13,138
  • Descendants: 211
  • Entry Notes: 16,536
  • Unique Tags: 185
  • Unique Topics: 58
  • Unique Categories: 352

πŸ—οΈ Database Schema (Full)

This schema includes all tables from the standard de-wiktionary-sqlite-normalized dataset, plus the following additions:

  • entries:
    • title: The Wiktionary page title.
    • redirect: The page this entry redirects to (if any).
  • entry_notes: (New Table) Free-text notes associated with an entry (e.g., "Es gibt etliche Belege fΓΌr die Steigerung...").
  • other_pos: (New Table) Alternative part-of-speech values for this word.
  • entry_raw_tags: (New Table) Unparsed, raw tags from Wiktionary.
  • descendants: (New Table) Words in other languages descended from this word.
  • hypernyms: (New Table) "Is-a" relationship (e.g., "Tier" is a hypernym of "Hund").
  • hyponyms: (New Table) "Type-of" relationship (e.g., "Hund" is a hyponym of "Tier").
  • holonyms: (New Table) "Part-of" relationship (e.g., "Hand" is a holonym of "Finger").
  • meronyms: (New Table) "Has-a" relationship (e.g., "Finger" is a meronym of "Hand").
  • coordinate_terms: (New Table) Sibling terms (e.g., "Hund" and "Katze" are coordinate terms under "Haustier").
  • expressions: (New Table) Idiomatic expressions using the word (linked to sense_id).
  • proverbs: (New Table) Proverbs using the word (linked to sense_id).

(For the standard schema, see the cstr/de-wiktionary-sqlite-normalized dataset card)

πŸ“– Usage

Download

from huggingface_hub import hf_hub_download
import sqlite3
import gzip
import shutil

# Download compressed database
db_gz_path = hf_hub_download(
    repo_id="cstr/de-wiktionary-sqlite-full",
    filename="de_wiktionary_normalized_full.db",
    repo_type="dataset"
)

# Decompress (if it's .gz)
db_path = db_gz_path.replace('.gz', '')
with gzip.open(db_gz_path, 'rb') as f_in:
    with open(db_path, 'wb') as f_out:
        shutil.copyfileobj(f_in, f_out)

# Connect
conn = sqlite3.connect(db_path)

Example Query (New Tables)

# Get all hypernyms (parent categories) for "Hund"
cursor.execute('''
    SELECT h.hypernym_word
    FROM entries e
    JOIN hypernyms h ON e.id = h.entry_id
    WHERE e.word = ? AND e.lang = 'Deutsch'
''', ('Hund',))

print("Hypernyms of 'Hund':", [row[0] for row in cursor.fetchall()])

πŸ”— Source

Original data: cstr/de-wiktionary-extracted

πŸ“œ License

CC-BY-SA 4.0 (same as source)