DANGDOCAO commited on
Commit
d9cad3f
·
verified ·
1 Parent(s): b888291

Delete HVU_QA/README.md

Browse files
Files changed (1) hide show
  1. HVU_QA/README.md +0 -133
HVU_QA/README.md DELETED
@@ -1,133 +0,0 @@
1
- # HVU_QA
2
-
3
- **HVU_QA** is an open-source Vietnamese Question–Context–Answer (QCA) corpus and supporting tools for building FAQ-style question generation systems in low-resource languages. The dataset was created using a fully automated pipeline that combines web crawling from trustworthy sources, semantic tag-based extraction, and AI-assisted filtering to ensure high factual accuracy.
4
-
5
- ## 📋 Dataset Description
6
-
7
- - **Language:** Vietnamese
8
- - **Format:** SQuAD-style JSON
9
- - **Total samples:** 39,000 QCA triples (full corpus released)
10
- - **Domains covered:** Social services, labor law, administrative processes, and other public service topics.
11
- - **Structure of each sample:**
12
- - **Question:** Generated or extracted question
13
- - **Context:** Supporting text passage from which the answer is derived
14
- - **Answer:** Answer span within the context
15
-
16
- ## ⚙️ Creation Pipeline
17
-
18
- The dataset was built using a 4-stage automated process:
19
- 1. **Selecting relevant QA websites** from trusted sources.
20
- 2. **Automated data crawling** to collect raw QA webpages.
21
- 3. **Extraction via semantic tags** to obtain clean Question–Context–Answer triples.
22
- 4. **AI-assisted filtering** to remove noisy or factually inconsistent samples.
23
-
24
- ## 📊 Quality Evaluation
25
- A fine-tuned `vit5-base` model trained on HVU_QA achieved:
26
-
27
- | Metric | Score |
28
- |-------------------------|----------------|
29
- | BLEU | 89.1 |
30
- | Semantic similarity | 91.5% (cos ≥ 0.8) |
31
- | Human grammar score | 4.58 / 5 |
32
- | Human usefulness score | 4.29 / 5 |
33
-
34
- These results confirm that HVU_QA is a high-quality resource for developing robust FAQ-style question generation models.
35
-
36
- ## 📁 Dataset Structure
37
- ```
38
- .HVU_QA
39
- ├── t5-viet-qg-finetuned/
40
- ├── fine_tune_qg.py
41
- ├── generate_question.py
42
- ├── 39k_train.json
43
- └── README.md
44
- ```
45
- ## 📁 Vietnamese Question Generation Tool
46
-
47
- ## 🛠️ Requirements
48
-
49
- * Python 3.8+
50
- * PyTorch >= 1.9
51
- * Transformers >= 4.30
52
- * scikit-learn
53
-
54
- ### 📦 Install Required Libraries
55
-
56
- ```bash
57
- pip install datasets transformers sentencepiece safetensors accelerate evaluate sacrebleu rouge-score nltk scikit-learn
58
- ```
59
-
60
- *(Install PyTorch separately from [pytorch.org](https://pytorch.org) if not installed yet.)*
61
-
62
- ### 📥 Load Dataset from Hugging Face Hub
63
- ```python
64
- from datasets import load_dataset
65
-
66
- ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train")
67
- print(ds[0])
68
- ```
69
- ## 📚 Usage
70
-
71
- * Train and evaluate a question generation model.
72
- * Develop Vietnamese NLP tools.
73
- * Conduct linguistic research.
74
-
75
- ### 🔹 Fine-tuning
76
-
77
- ```bash
78
- python fine_tune_qg.py
79
- ```
80
-
81
- This will:
82
-
83
- 1. Load the dataset from `39k_train.json`.
84
- 2. Fine-tune `VietAI/vit5-base`.
85
- 3. Save the trained model into `t5-viet-qg-finetuned/`.
86
-
87
- *(Or download the pre-trained model: [t5-viet-qg-finetuned](https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/tree/main).)*
88
-
89
- ### 🔹 Generating Questions
90
- ```bash
91
- python generate_question.py
92
- ```
93
-
94
- **Example:**
95
- ```
96
- Input passage:
97
- Cà phê sữa đá là một loại đồ uống nổi tiếng ở Việt Nam
98
- (Iced milk coffee is a famous drink in Vietnam)
99
-
100
- Number of questions: 5
101
- ```
102
- **Output:**
103
- ```
104
- 1. Loại cà phê nào nổi tiếng ở Việt Nam?
105
- (What type of coffee is famous in Vietnam?)
106
- 2. Tại sao cà phê sữa đá lại phổ biến?
107
- (Why is iced milk coffee popular?)
108
- 3. Cà phê sữa đá bao gồm những nguyên liệu gì?
109
- (What ingredients are included in iced milk coffee?)
110
- 4. Cà phê sữa đá có nguồn gốc từ đâu?
111
- (Where does iced milk coffee originate from?)
112
- 5. Cà phê sữa đá Việt Nam được pha chế như thế nào?
113
- (How is Vietnamese iced milk coffee prepared?)
114
- ```
115
- **You can adjust** in `generate_question.py`:
116
-
117
- - `top_k`, `top_p`, `temperature`, `no_repeat_ngram_size`, `repetition_penalty`
118
-
119
- ## 📌 Citation
120
- If you use **HVU_QA** in your research, please cite:
121
-
122
- ```bibtex
123
- @inproceedings{nguyen2025method,
124
- author = {Ha Nguyen and Phuc Le and Dang Do and Cuong Nguyen and Chung Mai},
125
- title = {A Method for Building QA Corpora for Low-Resource Languages},
126
- booktitle = {Proceedings of the 2025 International Symposium on Information and Communication Technology (SOICT 2025)},
127
- year = {2025},
128
- publisher = {Springer},
129
- series = {Communications in Computer and Information Science (CCIS)},
130
- address = {Nha Trang, Vietnam},
131
- note = {To appear}
132
- }
133
- ```