DANGDOCAO commited on
Commit
63b0f1c
·
verified ·
1 Parent(s): fb53b6b

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -293
README.md DELETED
@@ -1,293 +0,0 @@
1
- ---
2
- license: mit
3
- language:
4
- - vi
5
- tags:
6
- - vietai, vietnamese, nlp, question-answering, question-generation, low-resource
7
- pretty_name: HVU_QA - Vietnamese Question Generation Dataset
8
- size_categories:
9
- - 10K<n<100K
10
- ---
11
- # HVU_QA
12
-
13
- **HVU_QA** is a project dedicated to sharing datasets and tools for **Question Generation Processing (NLP)**, developed and maintained by the research team at **Hung Vuong University (HVU), Phu Tho, Vietnam**.
14
- This project is supported by **Hung Vuong University, Phu Tho, Vietnam**, with the aim of advancing research and applications in low-resource language processing, particularly for the Vietnamese language.
15
-
16
- ---
17
-
18
- ## 📚 Overview
19
-
20
- This repository enables you to:
21
-
22
- 1. Fine-tune the [VietAI/vit5-base](https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions) model on your own GQ dataset.
23
- 2. Generate multiple, diverse questions given a user-provided text passage (context).
24
-
25
- ---
26
-
27
- ## 📁 Datasets
28
-
29
- * Built following the **SQuAD v2.0 standard**, ensuring compatibility with NLP pipelines.
30
- * Includes tens of thousands of high-quality **Question–Context–Answer triples (QCA)**.
31
- * Suitable for both **training** and **evaluation**.
32
-
33
- ---
34
-
35
- ## 📁 Vietnamese Question Generation Tool
36
-
37
- A **command-line tool** for:
38
-
39
- * **Fine-tuning** a question generation model.
40
- * **Automatically generating questions** from Vietnamese text.
41
-
42
- Built on **Hugging Face Transformers (VietAI/vit5-base)** and **PyTorch**.
43
-
44
- ---
45
-
46
- ## ✨ Features
47
-
48
- * Fine-tune a question generation model with SQuAD v2.0 format data.
49
- * Generate diverse and creative questions from text passages.
50
- * Flexible generation parameters (`top-k`, `top-p`, `temperature`, etc.).
51
- * Simple command-line usage.
52
- * GPU support if available.
53
-
54
- ---
55
-
56
- ## 📊 Evaluation Results
57
-
58
- We conducted both **manual evaluation** (500 samples) and **automatic evaluation** (1,000 samples).
59
-
60
- | Evaluation Type | Precision | Recall | F1-Score |
61
- |------------------|-----------|--------|----------|
62
- | Automatic (1000) | 0.85 | 0.83 | 0.84 |
63
- | Manual (500) | 0.88 | 0.86 | 0.87 |
64
-
65
- ➡️ The model generates diverse, grammatically correct, and contextually appropriate questions.
66
-
67
- ---
68
-
69
- ## 🧩 Creation Process
70
-
71
- The dataset was built using a **4-stage automated pipeline**:
72
-
73
- 1. Select relevant QA websites from trusted sources.
74
- 2. Automatic crawling to collect raw QA pages.
75
- 3. Semantic tag extraction to obtain clean Question–Context–Answer triples.
76
- 4. AI-assisted filtering to remove noisy or inconsistent samples.
77
-
78
- ---
79
-
80
- ## 📝 Quality Evaluation
81
-
82
- A fine-tuned model trained on **HVU_QA (VietAI/vit5-base)** achieved:
83
-
84
- * **BLEU Score**: 90.61
85
- * **Semantic similarity**: 97.0% (cosine ≥ 0.8)
86
- * **Human evaluation**:
87
- * Grammar: **4.58 / 5**
88
- * Usefulness: **4.29 / 5**
89
-
90
- ➡️ These results confirm that **HVU_QA is a high-quality resource** for developing robust FAQ-style question generation models.
91
-
92
- ---
93
-
94
- ## 📂 Project Structure
95
-
96
- ```
97
- .HVU_QA/
98
- ├── t5-viet-qg-finetuned/
99
- ├── fine_tune_qg.py
100
- ├── generate_question.py
101
- ├── 30ktrain.json
102
- └── README.md
103
- ```
104
- > All data files are UTF-8 encoded and ready for use in NLP pipelines.
105
-
106
- ---
107
-
108
- ## 🛠️ Requirements
109
-
110
- * Python 3.8+
111
- * PyTorch >= 1.9
112
- * Transformers >= 4.30
113
- * scikit-learn
114
- * Fine-tuned model (download at: [link](https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/tree/main))
115
-
116
- ---
117
-
118
- ## 🚀 Setup
119
-
120
- ### Step 1: Download and Extract
121
-
122
- 1. Download `HVU_QA.zip`
123
- 2. Extract into a folder, e.g.:
124
-
125
- ```
126
- D:\your\HVU_QA
127
- ```
128
-
129
- ### Step 2: Add to Environment Path (if needed)
130
-
131
- 1. Open **System Properties → Environment Variables**
132
- 2. Select `Path` → **Edit** → **New**
133
- 3. Add the path, e.g.:
134
-
135
- ```
136
- D:\your\HVU_QA
137
- ```
138
-
139
- ### Step 3: Open in Visual Studio Code
140
-
141
- ```
142
- File -> Open Folder -> D:\HVU_QA
143
- ```
144
-
145
- ### Step 4: Install Required Libraries
146
-
147
- Open **Terminal** and run:
148
-
149
- #### 📦 Windows (PowerShell)
150
-
151
- **Required only**
152
-
153
- ```powershell
154
- python -m pip install --upgrade pip
155
- pip install torch transformers datasets scikit-learn sentencepiece safetensors
156
- ```
157
-
158
- **Required + Optional**
159
-
160
- ```powershell
161
- python -m pip install --upgrade pip
162
- pip install torch transformers datasets scikit-learn sentencepiece safetensors accelerate tensorboard evaluate sacrebleu rouge-score nltk
163
- ```
164
-
165
- #### 📦 Linux / macOS (bash/zsh)
166
-
167
- **Required only**
168
-
169
- ```bash
170
- python3 -m pip install --upgrade pip
171
- pip install torch transformers datasets scikit-learn sentencepiece safetensors
172
- ```
173
-
174
- **Required + Optional**
175
-
176
- ```bash
177
- python3 -m pip install --upgrade pip
178
- pip install torch transformers datasets scikit-learn sentencepiece safetensors accelerate tensorboard evaluate sacrebleu rouge-score nltk
179
- ```
180
-
181
- ✅ Verify installation:
182
-
183
- * Windows (PowerShell)
184
-
185
- ```powershell
186
- python -c "import torch, transformers, datasets, sklearn, sentencepiece, safetensors, accelerate, tensorboard, evaluate, sacrebleu, rouge_score, nltk; print('✅ All dependencies installed correctly!')"
187
- ```
188
-
189
- * Linux/macOS
190
-
191
- ```bash
192
- python3 -c "import torch, transformers, datasets, sklearn, sentencepiece, safetensors, accelerate, tensorboard, evaluate, sacrebleu, rouge_score, nltk; print('✅ All dependencies installed correctly!')"
193
- ```
194
-
195
- ---
196
-
197
- ## 📚 Usage
198
-
199
- * Train and evaluate a question generation model.
200
- * Develop Vietnamese NLP tools.
201
- * Conduct linguistic research.
202
-
203
- ### 🔹 Training (Fine-tuning)
204
-
205
- When you run `fine_tune_qg.py`, the script will:
206
-
207
- 1. Load the dataset from **`30ktrain.json`**
208
- 2. Fine-tune the `VietAI/vit5-base` model
209
- 3. Save the trained model into a new folder named **`t5-viet-qg-finetuned/`**
210
-
211
- Run:
212
-
213
- ```bash
214
- python fine_tune_qg.py
215
- ```
216
-
217
- ### 🔹 Generating Questions
218
-
219
- ```bash
220
- python generate_question.py
221
- ```
222
-
223
- **Example:**
224
-
225
- ```
226
- Input passage:
227
- Iced milk coffee is a famous drink in Vietnam.
228
-
229
- Number of questions: 5
230
- ```
231
-
232
- ✅ Output:
233
-
234
- 1. What type of coffee is famous in Vietnam?
235
- 2. Why is iced milk coffee popular?
236
- 3. What ingredients are included in iced milk coffee?
237
- 4. Where does iced milk coffee originate from?
238
- 5. How is Vietnamese iced milk coffee prepared?
239
-
240
- ---
241
-
242
- ## ⚙️ Generation Settings
243
-
244
- In `generate_question.py`, you can adjust:
245
-
246
- * `top_k`, `top_p`, `temperature`, `no_repeat_ngram_size`, `repetition_penalty`
247
-
248
- ---
249
-
250
- ## 🤝 Contribution
251
-
252
- We welcome contributions:
253
-
254
- * Open issues
255
- * Submit pull requests
256
- * Suggest improvements or add datasets
257
-
258
- ---
259
-
260
- ## 📄 Citation
261
-
262
- If you use this repository or datasets in research, please cite:
263
-
264
- **Ha Nguyen-Tien, Phuc Le-Hong, Dang Do-Cao, Cuong Nguyen-Hung, Chung Mai-Van. 2025. A Method to Build QA Corpora for Low-Resource Languages. Proceedings of KSE 2025. ACM TALLIP.**
265
-
266
- ```bibtex
267
- @inproceedings{nguyen2025hvuqa,
268
- title={A Method to Build QA Corpora for Low-Resource Languages},
269
- author={Ha Nguyen-Tien and Phuc Le-Hong and Dang Do-Cao and Cuong Nguyen-Hung and Chung Mai-Van},
270
- booktitle={Proceedings of KSE 2025},
271
- year={2025}
272
- }
273
- ```
274
-
275
- ---
276
-
277
- ## 📬 Contact
278
-
279
- * **Ha Nguyen-Tien** (Corresponding author)
280
- 📧 [nguyentienha@hvu.edu.vn](mailto:nguyentienha@hvu.edu.vn)
281
-
282
- * **Phuc Le-Hong**
283
- 📧 [Lehongphuc20021408@gmail.com](mailto:Lehongphuc20021408@gmail.com)
284
-
285
- * **Dang Do-Cao**
286
- 📧 [docaodang532001@gmail.com](mailto:docaodang532001@gmail.com)
287
-
288
- 📍 Faculty of Engineering and Technology, Hung Vuong University, Phu Tho, Vietnam
289
- 🌐 [https://hvu.edu.vn](https://hvu.edu.vn)
290
-
291
- ---
292
-
293
- *This repository is part of our ongoing effort to support Vietnamese NLP and make language technology more accessible for low-resource and underrepresented languages.*