|
|
--- |
|
|
license: cc-by-sa-4.0 |
|
|
task_categories: |
|
|
- text-retrieval |
|
|
language: |
|
|
- de |
|
|
tags: |
|
|
- wiktionary |
|
|
- dictionary |
|
|
- german |
|
|
size_categories: |
|
|
- 100K<n<1M |
|
|
--- |
|
|
|
|
|
# German Wiktionary SQLite Database |
|
|
|
|
|
This is a normalized SQLite database version of the German Wiktionary data. |
|
|
|
|
|
## Source |
|
|
|
|
|
Original data from: [cstr/de-wiktionary-extracted](https://huggingface.co/datasets/cstr/de-wiktionary-extracted) |
|
|
|
|
|
## Database Schema |
|
|
|
|
|
The database is normalized into the following tables: |
|
|
|
|
|
- **entries**: Main word entries (word, pos, lang, etc.) |
|
|
- **senses**: Word definitions and meanings |
|
|
- **translations**: Translations to other languages |
|
|
- **sounds**: Pronunciation information |
|
|
- **synonyms**: Synonymous words |
|
|
- **tags**: Tags/labels (many-to-many via entry_tags) |
|
|
- **categories**: Categories (many-to-many via entry_categories) |
|
|
- **forms**: Word forms (inflections, conjugations) |
|
|
- **hyphenations**: Hyphenation patterns |
|
|
|
|
|
## Indexes |
|
|
|
|
|
Optimized indexes on: |
|
|
- word (for fast lookups) |
|
|
- language |
|
|
- part of speech |
|
|
- all foreign keys |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
import sqlite3 |
|
|
from huggingface_hub import hf_hub_download |
|
|
|
|
|
# Download the database |
|
|
db_path = hf_hub_download(repo_id="cstr/de-wiktionary-sqlite", filename="de_wiktionary.db", repo_type="dataset") |
|
|
|
|
|
# Query it |
|
|
conn = sqlite3.connect(db_path) |
|
|
cursor = conn.cursor() |
|
|
|
|
|
# Example: Find all entries for "schnell" |
|
|
cursor.execute(''' |
|
|
SELECT e.word, e.pos, e.lang, s.sense_data |
|
|
FROM entries e |
|
|
LEFT JOIN senses s ON e.id = s.entry_id |
|
|
WHERE e.word = ? |
|
|
''', ('schnell',)) |
|
|
|
|
|
for row in cursor.fetchall(): |
|
|
print(row) |
|
|
|
|
|
conn.close() |
|
|
``` |
|
|
|
|
|
## Database Statistics |
|
|
|
|
|
- Entries: ~970,000+ German Wiktionary entries |
|
|
- Fully normalized schema with foreign keys |
|
|
- Indexed for fast lookups by word, language, and POS |
|
|
|
|
|
## License |
|
|
|
|
|
Same as source: CC-BY-SA 4.0 |
|
|
|