cstr commited on
Commit
0f6348c
·
verified ·
1 Parent(s): bca36df

Add comprehensive README for full dataset

Browse files
Files changed (1) hide show
  1. README.md +123 -0
README.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - linguistics
12
+ - morphology
13
+ - semantics
14
+ - normalized
15
+ - lossless
16
+ size_categories:
17
+ - 1M<n<10M
18
+ ---
19
+
20
+ # German Wiktionary - FULL Normalized SQLite Database
21
+
22
+ 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.
23
+
24
+ It is designed for production-ready applications, complex linguistic analysis, and mobile apps (Flutter, React Native) that require a comprehensive local dictionary.
25
+
26
+ ## 🎯 Key Features
27
+
28
+ - **✅ 100% Lossless**: All 30+ top-level and nested fields from the source JSONL are preserved.
29
+ - **⚡ Fast Queries**: Fully indexed schema for sub-20ms queries.
30
+ - **🔗 Full Semantic Web**: Includes all semantic relations (synonyms, antonyms, **hypernyms, hyponyms, meronyms, holonyms, coordinate_terms**).
31
+ - **🗣️ Rich Content**: Includes **expressions, proverbs, and entry notes** in addition to definitions and examples.
32
+ - **📱 Mobile-ready**: Optimized for `sqflite` (Flutter) and other local DB use cases.
33
+ - **(and all features from the standard DB: forms, translations, sounds, etc.)**
34
+
35
+ ## 📊 Database Statistics
36
+
37
+ - **Entries**: 0
38
+ - **Word Senses**: 0
39
+ - **Definitions (Glosses)**: 0
40
+ - **Translations**: 0
41
+ - **Word Forms (Inflections)**: 0
42
+ - **Form Tags (Total)**: 0
43
+ - **Pronunciations (Sounds)**: 0
44
+ - **Usage Examples**: 0
45
+ - **Synonyms**: 0
46
+ - **Antonyms**: 0
47
+ - **Hypernyms**: 0
48
+ - **Hyponyms**: 0
49
+ - **Proverbs**: 0
50
+ - **Expressions**: 0
51
+ - **Descendants**: 0
52
+ - **Entry Notes**: 0
53
+ - **Unique Tags**: 0
54
+ - **Unique Topics**: 0
55
+ - **Unique Categories**: 0
56
+
57
+ ## 🏗️ Database Schema (Full)
58
+
59
+ This schema includes all tables from the standard `de-wiktionary-sqlite-normalized` dataset, plus the following additions:
60
+
61
+ - **entries**:
62
+ - `title`: The Wiktionary page title.
63
+ - `redirect`: The page this entry redirects to (if any).
64
+ - **entry_notes**: (New Table) Free-text notes associated with an entry (e.g., "Es gibt etliche Belege für die Steigerung...").
65
+ - **other_pos**: (New Table) Alternative part-of-speech values for this word.
66
+ - **entry_raw_tags**: (New Table) Unparsed, raw tags from Wiktionary.
67
+ - **descendants**: (New Table) Words in other languages descended from this word.
68
+ - **hypernyms**: (New Table) "Is-a" relationship (e.g., "Tier" is a hypernym of "Hund").
69
+ - **hyponyms**: (New Table) "Type-of" relationship (e.g., "Hund" is a hyponym of "Tier").
70
+ - **holonyms**: (New Table) "Part-of" relationship (e.g., "Hand" is a holonym of "Finger").
71
+ - **meronyms**: (New Table) "Has-a" relationship (e.g., "Finger" is a meronym of "Hand").
72
+ - **coordinate_terms**: (New Table) Sibling terms (e.g., "Hund" and "Katze" are coordinate terms under "Haustier").
73
+ - **expressions**: (New Table) Idiomatic expressions using the word (linked to `sense_id`).
74
+ - **proverbs**: (New Table) Proverbs using the word (linked to `sense_id`).
75
+
76
+ *(For the standard schema, see the `cstr/de-wiktionary-sqlite-normalized` dataset card)*
77
+
78
+ ## 📖 Usage
79
+
80
+ ### Download
81
+ ```python
82
+ from huggingface_hub import hf_hub_download
83
+ import sqlite3
84
+ import gzip
85
+ import shutil
86
+
87
+ # Download compressed database
88
+ db_gz_path = hf_hub_download(
89
+ repo_id="cstr/de-wiktionary-sqlite-full",
90
+ filename="de_wiktionary_normalized_full.db",
91
+ repo_type="dataset"
92
+ )
93
+
94
+ # Decompress (if it's .gz)
95
+ db_path = db_gz_path.replace('.gz', '')
96
+ with gzip.open(db_gz_path, 'rb') as f_in:
97
+ with open(db_path, 'wb') as f_out:
98
+ shutil.copyfileobj(f_in, f_out)
99
+
100
+ # Connect
101
+ conn = sqlite3.connect(db_path)
102
+ ```
103
+
104
+ ### Example Query (New Tables)
105
+ ```python
106
+ # Get all hypernyms (parent categories) for "Hund"
107
+ cursor.execute('''
108
+ SELECT h.hypernym_word
109
+ FROM entries e
110
+ JOIN hypernyms h ON e.id = h.entry_id
111
+ WHERE e.word = ? AND e.lang = 'Deutsch'
112
+ ''', ('Hund',))
113
+
114
+ print("Hypernyms of 'Hund':", [row[0] for row in cursor.fetchall()])
115
+ ```
116
+
117
+ ## 🔗 Source
118
+
119
+ Original data: [cstr/de-wiktionary-extracted](https://huggingface.co/datasets/cstr/de-wiktionary-extracted)
120
+
121
+ ## 📜 License
122
+
123
+ CC-BY-SA 3.0 (same as source)