DANGDOCAO commited on
Commit
df411b0
·
verified ·
1 Parent(s): e45e5fb

update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -167
README.md DELETED
@@ -1,167 +0,0 @@
1
- ---
2
- license: mit
3
- language:
4
- - vi
5
- tags:
6
- - ag
7
- - t5
8
- - vit5
9
- - squad-format
10
- - vietnamese
11
- - education
12
- - nlp
13
- pretty_name: vietnamese Question Generation
14
- size_categories:
15
- - 10K<n<100K
16
- ---
17
-
18
- # HVU_QA
19
-
20
- **HVU_QA** is an open-source Vietnamese Question–Context–Answer (QCA) corpus for building FAQ-style question generation systems in low-resource languages.
21
- It was created using a fully automated pipeline combining web crawling, semantic tag-based extraction, and AI-assisted filtering to ensure high factual accuracy.
22
-
23
- ## Dataset Description
24
-
25
- - Language: Vietnamese
26
- - Format: SQuAD-style JSON
27
- - Size: 30,000 QCA triples
28
- - Domains: Social services, labor law, administrative processes, and public service topics
29
-
30
- Each data sample contains:
31
- - `question`: The generated or extracted question
32
- - `context`: The supporting passage
33
- - `answer`: The answer span within the context
34
-
35
- ## Dataset Creation
36
-
37
- **Pipeline:**
38
- 1. Selecting relevant QA websites from trusted sources
39
- 2. Automated crawling to collect raw QA webpages
40
- 3. Semantic tag-based extraction to get clean QCA triples
41
- 4. AI-assisted filtering to remove noisy or inconsistent samples
42
-
43
- **Annotation & Licensing:**
44
- All data are collected from public-domain Vietnamese government and service portals, released under CC BY 4.0.
45
-
46
- ## Quality Evaluation
47
-
48
- A fine-tuned `VietAI/vit5-base` model trained on **HVU_QA** was used to validate the dataset quality.
49
-
50
- **Automatic metrics:**
51
-
52
- | Metric | Score |
53
- |-----------------------|----------------------|
54
- | BLEU | 90.61 |
55
- | Semantic similarity | 97.0% (cosine ≥ 0.8) |
56
-
57
- **Human evaluation (1–5 scale):**
58
-
59
- | Aspect | Avg. Score |
60
- |------------------|-------------|
61
- | Grammaticality | 4.58 / 5 |
62
- | Usefulness | 4.29 / 5 |
63
-
64
- These results confirm that **HVU_QA** is a high-quality resource for developing robust FAQ-style question generation models.
65
-
66
- ## Setup
67
-
68
- ### Step 1 — Clone repository (optional if local)
69
-
70
- ```bash
71
- git clone https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions
72
- cd GeneratingQuestions
73
- ```
74
-
75
- ### Step 2 — Install dependencies
76
-
77
- **Minimal:**
78
- ```bash
79
- python -m pip install --upgrade pip
80
- pip install datasets transformers sentencepiece safetensors
81
- ```
82
-
83
- **Recommended (for training & evaluation):**
84
- ```bash
85
- pip install datasets transformers sentencepiece safetensors accelerate evaluate sacrebleu rouge-score nltk tensorboard scikit-learn
86
- ```
87
-
88
- **Install PyTorch (choose CUDA/CPU from https://pytorch.org):**
89
- ```bash
90
- pip install torch
91
- ```
92
-
93
- ### Step 3 — (Optional) Configure environment
94
-
95
- ```bash
96
- pip install -U huggingface_hub
97
- huggingface-cli login
98
- git lfs install
99
- ```
100
-
101
- Only needed if you want to push to Hub or download private models.
102
-
103
- ### Step 4 — Download data
104
-
105
- ```python
106
- from datasets import load_dataset
107
- ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train")
108
- print(ds[0])
109
- ```
110
-
111
- Or from local JSON:
112
- ```python
113
- ds = load_dataset("json", data_files="30ktrain.json", split="train")
114
- ```
115
-
116
- ### Step 5 — Verify installation
117
-
118
- ```bash
119
- python -c "import torch, transformers, datasets, sklearn, sentencepiece, safetensors; print('All installed OK!')"
120
- ```
121
-
122
- ## Usage
123
-
124
- ### Fine-tune model
125
-
126
- ```bash
127
- python fine_tune_qg.py
128
- ```
129
-
130
- This will:
131
- 1. Load data from `30ktrain.json`
132
- 2. Fine-tune `VietAI/vit5-base`
133
- 3. Save model to `t5-viet-qg-finetuned/`
134
-
135
- ### Generate questions
136
-
137
- ```bash
138
- python generate_question.py
139
- ```
140
-
141
- Example
142
- ```
143
- Input passage:
144
- Iced milk coffee (Cà phê sữa đá) is a famous drink in Vietnam.
145
- Number of questions: 5
146
- ```
147
-
148
- Output
149
- 1. What type of coffee is famous in Vietnam?
150
- 2. Why is iced milk coffee popular?
151
- 3. What ingredients are included in iced milk coffee?
152
- 4. Where does iced milk coffee originate from?
153
- 5. How is Vietnamese iced milk coffee prepared?
154
-
155
- Adjustable parameters (`generate_question.py`):
156
- `top_k`, `top_p`, `temperature`, `no_repeat_ngram_size`, `repetition_penalty`
157
-
158
- ## Citation
159
-
160
- ```bibtex
161
- @inproceedings{nguyen2025hvuqa,
162
- title={A Method to Build QA Corpora for Low-Resource Languages},
163
- author={Ha Nguyen-Tien and Phuc Le-Hong and Dang Do-Cao and Cuong Nguyen-Hung and Chung Mai-Van},
164
- booktitle={Proceedings of the International Conference on Knowledge and Systems Engineering (KSE)},
165
- year={2025}
166
- }
167
- ```