Datasets:
Delete README.md
Browse files
README.md
DELETED
|
@@ -1,210 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
task_categories:
|
| 4 |
-
- question-answering
|
| 5 |
-
- text-generation
|
| 6 |
-
- table-question-answering
|
| 7 |
-
- sentence-similarity
|
| 8 |
-
- feature-extraction
|
| 9 |
-
language:
|
| 10 |
-
- vi
|
| 11 |
-
tags:
|
| 12 |
-
- question-generation
|
| 13 |
-
- nlp
|
| 14 |
-
- faq
|
| 15 |
-
- low-resource
|
| 16 |
-
- code
|
| 17 |
-
pretty_name: HVU_QA
|
| 18 |
-
size_categories:
|
| 19 |
-
- 10K<n<100K
|
| 20 |
-
configs:
|
| 21 |
-
- config_name: default
|
| 22 |
-
data_files:
|
| 23 |
-
- split: train
|
| 24 |
-
path: 40k_train.json
|
| 25 |
-
---
|
| 26 |
-
# HVU_QA
|
| 27 |
-
|
| 28 |
-
**HVU_QA** is an open-source Vietnamese Question-Context-Answer (QCA) corpus, accompanied by supporting tools, created to facilitate the development of FAQ-style question generation and question answering systems, particularly for low-resource language settings. The dataset was developed by a research team at Hung Vuong University, Phu Tho, Vietnam, led by Dr. Ha Nguyen, Deputy Head of the Department of Engineering Technology. HVU_QA was constructed using a fully automated data-building pipeline that combines web crawling from reliable sources, semantic tag-based extraction, and AI-assisted filtering, helping ensure high factual accuracy, consistent structure, and practical usability for real-world applications.
|
| 29 |
-
|
| 30 |
-
## 📋 Dataset Description
|
| 31 |
-
|
| 32 |
-
- **Language:** Vietnamese
|
| 33 |
-
- **Format:** SQuAD-style JSON
|
| 34 |
-
- **Total samples:** 40,000 QCA triples (full corpus released)
|
| 35 |
-
- **Domains covered:** Social services, labor law, administrative processes, and other public service topics.
|
| 36 |
-
- **Structure of each sample:**
|
| 37 |
-
- **Question:** Generated or extracted question
|
| 38 |
-
- **Context:** Supporting text passage from which the answer is derived
|
| 39 |
-
- **Answer:** Answer span within the context
|
| 40 |
-
|
| 41 |
-
## ⚙️ Creation Pipeline
|
| 42 |
-
|
| 43 |
-
The dataset was built using a 4-stage automated process:
|
| 44 |
-
1. **Selecting relevant QA websites** from trusted sources.
|
| 45 |
-
2. **Automated data crawling** to collect raw QA webpages.
|
| 46 |
-
3. **Extraction via semantic tags** to obtain clean Question-Context-Answer triples.
|
| 47 |
-
4. **AI-assisted filtering** to remove noisy or factually inconsistent samples.
|
| 48 |
-
|
| 49 |
-
## 📊 Quality Evaluation
|
| 50 |
-
A fine-tuned `vit5-base` model trained on HVU_QA achieved:
|
| 51 |
-
|
| 52 |
-
| Metric | Score |
|
| 53 |
-
|-------------------------|----------------|
|
| 54 |
-
| BLEU | 89.1 |
|
| 55 |
-
| Semantic similarity | 91.5% (cos ≥ 0.8) |
|
| 56 |
-
| Human grammar score | 4.58 / 5 |
|
| 57 |
-
| Human usefulness score | 4.29 / 5 |
|
| 58 |
-
|
| 59 |
-
These results confirm that HVU_QA is a high-quality resource for developing robust FAQ-style question generation models.
|
| 60 |
-
|
| 61 |
-
## 📁 Project Structure
|
| 62 |
-
```text
|
| 63 |
-
HVU_QA/
|
| 64 |
-
├── backend/
|
| 65 |
-
│ ├── __init__.py
|
| 66 |
-
│ └── app.py
|
| 67 |
-
├── frontend/
|
| 68 |
-
│ ├── index.html
|
| 69 |
-
│ ├── app.js
|
| 70 |
-
│ └── style.css
|
| 71 |
-
├── t5-viet-qg-finetuned/
|
| 72 |
-
├── fine_tune_qg.py
|
| 73 |
-
├── generate_question.py
|
| 74 |
-
├── HVU_QA_tool.py
|
| 75 |
-
├── main.py
|
| 76 |
-
├── 40k_train.json
|
| 77 |
-
├── requirements.txt
|
| 78 |
-
└── README.md
|
| 79 |
-
```
|
| 80 |
-
## 📁 Vietnamese Question Generation Tool
|
| 81 |
-
|
| 82 |
-
## 🛠️ Requirements
|
| 83 |
-
|
| 84 |
-
* Python 3.10+
|
| 85 |
-
* pip
|
| 86 |
-
* Optional: NVIDIA GPU with CUDA for faster inference or training
|
| 87 |
-
|
| 88 |
-
### 📦 Install Required Libraries
|
| 89 |
-
|
| 90 |
-
```bash
|
| 91 |
-
python -m venv venv
|
| 92 |
-
|
| 93 |
-
# Windows
|
| 94 |
-
venv\Scripts\activate
|
| 95 |
-
|
| 96 |
-
# macOS / Linux
|
| 97 |
-
source venv/bin/activate
|
| 98 |
-
|
| 99 |
-
python -m pip install --upgrade pip
|
| 100 |
-
python -m pip install -r requirements.txt
|
| 101 |
-
```
|
| 102 |
-
|
| 103 |
-
*(If you want to use NVIDIA GPU, install the PyTorch version that matches your CUDA setup from [pytorch.org](https://pytorch.org) first.)*
|
| 104 |
-
|
| 105 |
-
### 📥 Load Dataset from Hugging Face Hub
|
| 106 |
-
```python
|
| 107 |
-
from datasets import load_dataset
|
| 108 |
-
|
| 109 |
-
ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train")
|
| 110 |
-
print(ds[0])
|
| 111 |
-
```
|
| 112 |
-
## 📚 Usage
|
| 113 |
-
|
| 114 |
-
* Train and evaluate a question generation model.
|
| 115 |
-
* Develop Vietnamese NLP tools.
|
| 116 |
-
* Conduct linguistic research.
|
| 117 |
-
|
| 118 |
-
### 🔹 Fine-tuning
|
| 119 |
-
|
| 120 |
-
```bash
|
| 121 |
-
python fine_tune_qg.py
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
This will:
|
| 125 |
-
|
| 126 |
-
1. Load the dataset from `40k_train.json`.
|
| 127 |
-
2. Fine-tune `VietAI/vit5-base`.
|
| 128 |
-
3. Save the trained model into `t5-viet-qg-finetuned/`.
|
| 129 |
-
|
| 130 |
-
*(Or download the pre-trained model: [t5-viet-qg-finetuned](https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/tree/main).)*
|
| 131 |
-
|
| 132 |
-
### 🔹 Generating Questions
|
| 133 |
-
```bash
|
| 134 |
-
python generate_question.py
|
| 135 |
-
```
|
| 136 |
-
|
| 137 |
-
**Example:**
|
| 138 |
-
```
|
| 139 |
-
Input passage:
|
| 140 |
-
Cà phê sữa đá là một loại đồ uống nổi tiếng ở Việt Nam
|
| 141 |
-
(Iced milk coffee is a famous drink in Vietnam)
|
| 142 |
-
|
| 143 |
-
Number of questions: 5
|
| 144 |
-
```
|
| 145 |
-
**Output:**
|
| 146 |
-
```
|
| 147 |
-
1. Loại cà phê nào nổi tiếng ở Việt Nam?
|
| 148 |
-
(What type of coffee is famous in Vietnam?)
|
| 149 |
-
2. Tại sao cà phê sữa đá lại phổ biến?
|
| 150 |
-
(Why is iced milk coffee popular?)
|
| 151 |
-
3. Cà phê sữa đá bao gồm những nguyên liệu gì?
|
| 152 |
-
(What ingredients are included in iced milk coffee?)
|
| 153 |
-
4. Cà phê sữa đá có nguồn gốc từ đâu?
|
| 154 |
-
(Where does iced milk coffee originate from?)
|
| 155 |
-
5. Cà phê sữa đá Việt Nam được pha chế như thế nào?
|
| 156 |
-
(How is Vietnamese iced milk coffee prepared?)
|
| 157 |
-
```
|
| 158 |
-
**You can adjust** in `generate_question.py`:
|
| 159 |
-
|
| 160 |
-
- `top_k`, `top_p`, `temperature`, `no_repeat_ngram_size`, `repetition_penalty`
|
| 161 |
-
|
| 162 |
-
## 📌 Citation
|
| 163 |
-
If you use **HVU_QA** in your research, please cite:
|
| 164 |
-
|
| 165 |
-
```bibtex
|
| 166 |
-
@inproceedings{nguyen2025method,
|
| 167 |
-
author = {Ha Nguyen and Phuc Le and Dang Do and Cuong Nguyen and Chung Mai},
|
| 168 |
-
title = {A Method for Building QA Corpora for Low-Resource Languages},
|
| 169 |
-
booktitle = {Proceedings of the 2025 International Symposium on Information and Communication Technology (SOICT 2025)},
|
| 170 |
-
year = {2025},
|
| 171 |
-
publisher = {Springer},
|
| 172 |
-
series = {Communications in Computer and Information Science (CCIS)},
|
| 173 |
-
address = {Nha Trang, Vietnam},
|
| 174 |
-
note = {To appear}
|
| 175 |
-
}
|
| 176 |
-
```
|
| 177 |
-
## ❤️ Support / Funding
|
| 178 |
-
|
| 179 |
-
If you find **HVU_QA** useful, please consider supporting our work.
|
| 180 |
-
Your contributions help us maintain the dataset, improve quality, and release new versions (cleaning, expansion, benchmarks, and tools).
|
| 181 |
-
|
| 182 |
-
### 🇻🇳 Donate via VietQR (scan to support)
|
| 183 |
-
This **VietQR / NAPAS 247** code can be scanned by Vietnamese banking apps and some international payment apps that support QR bank transfers.
|
| 184 |
-
|
| 185 |
-
<img src="QRtk.jpg" alt="VietQR Support" width="320"/>
|
| 186 |
-
|
| 187 |
-
**Bank:** VietinBank (Vietnam)
|
| 188 |
-
**Account name:** NGUYEN TIEN HA
|
| 189 |
-
**Account number:** 103004492490
|
| 190 |
-
**Branch:** VietinBank CN PHU THO - HOI SO
|
| 191 |
-
|
| 192 |
-
### 🌍 International Support (Quick card payment)
|
| 193 |
-
If you are outside Vietnam, you can support this project via **Buy Me a Coffee**
|
| 194 |
-
(no PayPal account needed - pay directly with a credit/debit card):
|
| 195 |
-
- BuyMeACoffee: https://buymeacoffee.com/hanguyen0408
|
| 196 |
-
|
| 197 |
-
### 🌍 International Support (PayPal)
|
| 198 |
-
If you prefer PayPal, you can also support us here:
|
| 199 |
-
- PayPal.me: https://paypal.me/HaNguyen0408
|
| 200 |
-
|
| 201 |
-
### ✨ Other ways to support
|
| 202 |
-
- ⭐ Star this repository / dataset on Hugging Face
|
| 203 |
-
- 📌 Cite our paper if you use it in your research
|
| 204 |
-
- 🐛 Open issues / pull requests to improve the dataset and tools
|
| 205 |
-
|
| 206 |
-
## 📬 Contact / Maintainers
|
| 207 |
-
For questions, feedback, collaborations, or issue reports related to HVU_QA, please contact:
|
| 208 |
-
Dr. Ha Nguyen (Project Lead)
|
| 209 |
-
Hung Vuong University, Phu Tho, Vietnam
|
| 210 |
-
Email: nguyentienha@hvu.edu.vn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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