Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-sa-3.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-retrieval
|
| 5 |
+
language:
|
| 6 |
+
- de
|
| 7 |
+
tags:
|
| 8 |
+
- wiktionary
|
| 9 |
+
- dictionary
|
| 10 |
+
- german
|
| 11 |
+
size_categories:
|
| 12 |
+
- 100K<n<1M
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# German Wiktionary SQLite Database
|
| 16 |
+
|
| 17 |
+
This is a normalized SQLite database version of the German Wiktionary data.
|
| 18 |
+
|
| 19 |
+
## Source
|
| 20 |
+
|
| 21 |
+
Original data from: [cstr/de-wiktionary-extracted](https://huggingface.co/datasets/cstr/de-wiktionary-extracted)
|
| 22 |
+
|
| 23 |
+
## Database Schema
|
| 24 |
+
|
| 25 |
+
The database is normalized into the following tables:
|
| 26 |
+
|
| 27 |
+
- **entries**: Main word entries (word, pos, lang, etc.)
|
| 28 |
+
- **senses**: Word definitions and meanings
|
| 29 |
+
- **translations**: Translations to other languages
|
| 30 |
+
- **sounds**: Pronunciation information
|
| 31 |
+
- **synonyms**: Synonymous words
|
| 32 |
+
- **tags**: Tags/labels (many-to-many via entry_tags)
|
| 33 |
+
- **categories**: Categories (many-to-many via entry_categories)
|
| 34 |
+
- **forms**: Word forms (inflections, conjugations)
|
| 35 |
+
- **hyphenations**: Hyphenation patterns
|
| 36 |
+
|
| 37 |
+
## Indexes
|
| 38 |
+
|
| 39 |
+
Optimized indexes on:
|
| 40 |
+
- word (for fast lookups)
|
| 41 |
+
- language
|
| 42 |
+
- part of speech
|
| 43 |
+
- all foreign keys
|
| 44 |
+
|
| 45 |
+
## Usage
|
| 46 |
+
|
| 47 |
+
```python
|
| 48 |
+
import sqlite3
|
| 49 |
+
from huggingface_hub import hf_hub_download
|
| 50 |
+
|
| 51 |
+
# Download the database
|
| 52 |
+
db_path = hf_hub_download(repo_id="cstr/de-wiktionary-sqlite", filename="de_wiktionary.db", repo_type="dataset")
|
| 53 |
+
|
| 54 |
+
# Query it
|
| 55 |
+
conn = sqlite3.connect(db_path)
|
| 56 |
+
cursor = conn.cursor()
|
| 57 |
+
|
| 58 |
+
# Example: Find all entries for "schnell"
|
| 59 |
+
cursor.execute('''
|
| 60 |
+
SELECT e.word, e.pos, e.lang, s.sense_data
|
| 61 |
+
FROM entries e
|
| 62 |
+
LEFT JOIN senses s ON e.id = s.entry_id
|
| 63 |
+
WHERE e.word = ?
|
| 64 |
+
''', ('schnell',))
|
| 65 |
+
|
| 66 |
+
for row in cursor.fetchall():
|
| 67 |
+
print(row)
|
| 68 |
+
|
| 69 |
+
conn.close()
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## Database Statistics
|
| 73 |
+
|
| 74 |
+
- Entries: ~970,000+ German Wiktionary entries
|
| 75 |
+
- Fully normalized schema with foreign keys
|
| 76 |
+
- Indexed for fast lookups by word, language, and POS
|
| 77 |
+
|
| 78 |
+
## License
|
| 79 |
+
|
| 80 |
+
Same as source: CC-BY-SA 3.0
|