Datasets:
metadata
license: cc-by-sa-3.0
task_categories:
- text-retrieval
language:
- de
tags:
- wiktionary
- dictionary
- german
- linguistics
- morphology
- semantics
- normalized
- lossless
size_categories:
- 1M<n<10M
German Wiktionary - Normalized SQLite Database with semantic web data etc
This is a lossless, fully normalized SQLite database of German Wiktionary, capturing every field from the cstr/de-wiktionary-extracted dataset.
π― Key Features
- β
100% Lossless: ALL fields captured including:
- π Wikilinks in definitions (semantic connections)
- π Qualifiers (e.g., "archaic", "Swiss", "informal")
- π·οΈ Sense IDs (unique identifiers)
- π Wikidata IDs (for semantic web linking)
- π Attestations (historical citations)
- π Head templates (morphological data like Genus/Plural)
- π Info templates (structured metadata)
- β‘ Fast Queries: Fully indexed schema for sub-20ms queries
- π Complete Semantic Web: All relations preserved with sense-level granularity
- π± Mobile-ready: Optimized for sqflite (Flutter) and local DB use cases
π Database Statistics
- Entries: 970,801
- Word Senses: 3,098,364
- Definitions (Glosses): 3,087,300
- Wikilinks: 0
- Sense IDs: 3,098,364
- Qualifiers: Embedded in senses
- Translations: 1,131,251
- Word Forms: 6,100,090
- Head Templates: 0
- Pronunciations: 2,327,762
- Examples: 427,322
- Attestations: 0
- Wikidata IDs: 0
- Synonyms: 161,563
- Antonyms: 76,054
- Hypernyms: 133,059
- Hyponyms: 0
ποΈ Database Schema (40+ Tables)
New Tables (vs Previous Versions)
- head_templates: Morphological templates (Crucial for German inflection/gender)
- entry_wikipedia: Wikipedia cross-references
- sense_links: Wikilinks in definitions
- sense_raw_tags: Unstructured tags
- sense_wikidata: Wikidata identifiers
- sense_wikipedia: Wikipedia at sense level
- attestations: Historical citations
- info_templates: Structured metadata
Core Tables
- entries: Core word data with etymology
- senses: Definitions with qualifier, senseid, head_nr
- translations: Multi-language translations
- examples: Usage examples
- semantic relations: hypernyms/hyponyms/meronyms/holonyms/coordinate_terms
π 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-semantic",
filename="de_wiktionary_normalized_full.db.gz",
repo_type="dataset"
)
# Decompress
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 Queries
# Get definition with wikilinks for "Hund"
cursor.execute('''
SELECT g.gloss_text, GROUP_CONCAT(l.link_text, ', ') as links
FROM entries e
JOIN senses s ON e.id = s.entry_id
JOIN glosses g ON s.id = g.sense_id
LEFT JOIN sense_links l ON s.id = l.sense_id
WHERE e.word = ? AND e.lang = 'Deutsch'
GROUP BY g.id
''', ('Hund',))
# Find Wikidata ID for a sense
cursor.execute('''
SELECT e.word, w.wikidata_id
FROM entries e
JOIN senses s ON e.id = s.entry_id
JOIN sense_wikidata w ON s.id = w.sense_id
WHERE e.word = ?
''', ('Katze',))
π License
CC-BY-SA 4.0 (same as source)