cstr commited on
Commit
22f3c19
·
verified ·
1 Parent(s): 86d47f3

Add comprehensive README for full dataset

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-3.0
3
+ task_categories:
4
+ - text-retrieval
5
+ language:
6
+ - en
7
+ tags:
8
+ - wiktionary
9
+ - dictionary
10
+ - english
11
+ - linguistics
12
+ - morphology
13
+ - semantics
14
+ - normalized
15
+ - lossless
16
+ size_categories:
17
+ - 1M<n<10M
18
+ ---
19
+
20
+ # English Wiktionary - FULL Normalized SQLite Database
21
+
22
+ This is a **complete, lossless, and fully normalized** SQLite database of English Wiktionary, capturing 100% of the structured data from the `cstr/en-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
+
34
+ ## 📊 Database Statistics
35
+
36
+ - **Entries**: 1,243,200
37
+ - **Word Senses**: 1,361,968
38
+ - **Definitions (Glosses)**: 1,381,486
39
+ - **Translations**: 0
40
+ - **Word Forms (Inflections)**: 700,191
41
+ - **Pronunciations (Sounds)**: 0
42
+ - **Usage Examples**: 0
43
+ - **Synonyms**: 1,672
44
+ - **Antonyms**: 296
45
+ - **Hypernyms**: 207
46
+ - **Hyponyms**: 1,129
47
+ - **Proverbs**: 0
48
+ - **Expressions**: 0
49
+ - **Descendants**: 0
50
+
51
+ ## 🏗️ Database Schema
52
+
53
+ Includes the following key tables:
54
+ - **entries**: Core word data.
55
+ - **senses**: Definitions and semantic clusters.
56
+ - **translations**: Translations into other languages.
57
+ - **examples**: Usage examples.
58
+ - **hypernyms/hyponyms/meronyms/holonyms**: Semantic relationships.
59
+ - **expressions/proverbs**: Idiomatic usage.
60
+
61
+ ## 📖 Usage
62
+
63
+ ### Download
64
+ ```python
65
+ from huggingface_hub import hf_hub_download
66
+ import sqlite3
67
+ import gzip
68
+ import shutil
69
+
70
+ # Download compressed database
71
+ db_gz_path = hf_hub_download(
72
+ repo_id="cstr/en-wiktionary-sqlite-full",
73
+ filename="en_wiktionary_normalized_full.db.gz",
74
+ repo_type="dataset"
75
+ )
76
+
77
+ # Decompress
78
+ db_path = db_gz_path.replace('.gz', '')
79
+ with gzip.open(db_gz_path, 'rb') as f_in:
80
+ with open(db_path, 'wb') as f_out:
81
+ shutil.copyfileobj(f_in, f_out)
82
+
83
+ # Connect
84
+ conn = sqlite3.connect(db_path)
85
+ ````
86
+
87
+ ### Example Query
88
+
89
+ ```python
90
+ # Get all hypernyms (parent categories) for "dog"
91
+ cursor.execute('''
92
+ SELECT h.hypernym_word
93
+ FROM entries e
94
+ JOIN hypernyms h ON e.id = h.entry_id
95
+ WHERE e.word = ? AND e.lang = 'English'
96
+ ''', ('dog',))
97
+
98
+ print("Hypernyms of 'dog':", [row[0] for row in cursor.fetchall()])
99
+ ```
100
+
101
+ ## 📜 License
102
+
103
+ CC-BY-SA 4.0 (same as source)