Datasets:
|
Download README.md from DANGDOCAO/GeneratingQuestions: direct link, hf CLI and curl.
- Browser
- Download file 8.55 kB
-
https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/resolve/main/README.md
- Command line
-
hf download hf://datasets/DANGDOCAO/GeneratingQuestions/README.md
-
curl -L -o README.md https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/resolve/main/README.md
8.55 kB
| license: mit | |
| task_categories: | |
| - question-answering | |
| - text-generation | |
| - table-question-answering | |
| - sentence-similarity | |
| - feature-extraction | |
| language: | |
| - vi | |
| tags: | |
| - question-generation | |
| - nlp | |
| - faq | |
| - low-resource | |
| - code | |
| pretty_name: HVU_QA | |
| size_categories: | |
| - 10K<n<100K | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: 40k_train.json | |
| # HVU_QA | |
| **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. | |
| ## 📋 Dataset Description | |
| - **Language:** Vietnamese | |
| - **Format:** SQuAD-style JSON | |
| - **Total samples:** 40,000 QCA triples (full corpus released) | |
| - **Domains covered:** Social services, labor law, administrative processes, and other public service topics. | |
| - **Structure of each sample:** | |
| - **Question:** Generated or extracted question | |
| - **Context:** Supporting text passage from which the answer is derived | |
| - **Answer:** Answer span within the context | |
| ## ⚙️ Creation Pipeline | |
| The dataset was built using a 5-stage automated process: | |
| 1. **Selecting relevant QA websites** from trusted sources. | |
| 2. **Automated data crawling** to collect raw QA webpages. | |
| 3. **Extraction via semantic tags** to obtain clean Question-Context-Answer triples. | |
| 4. **AI-assisted filtering** to remove noisy or factually inconsistent samples. | |
| 5. **Final canonicalization and deduplication** to eliminate redundancy and maintain corpus diversity. | |
| ## 📊 Quality Evaluation | |
| A fine-tuned `vit5-base` model trained on HVU_QA achieved: | |
| | Metric | Score | | |
| |-------------------------|----------------| | |
| | BLEU | 89.1 | | |
| | Semantic similarity | 91.5% (cos ≥ 0.8) | | |
| | Human grammar score | 4.58 / 5 | | |
| | Human usefulness score | 4.29 / 5 | | |
| These results confirm that HVU_QA is a high-quality resource for developing robust FAQ-style question generation models. | |
| ## 📁 Project Structure | |
| ```text | |
| HVU_QA/ | |
| ├── backend/ | |
| │ ├── __init__.py | |
| │ └── app.py | |
| ├── frontend/ | |
| │ ├── HVU.png | |
| │ ├── index.html | |
| │ ├── app.js | |
| │ └── style.css | |
| ├── t5-viet-qg-finetuned/ | |
| ├── fine_tune_qg.py | |
| ├── generate_question.py | |
| ├── HVU_QA_tool.py | |
| ├── main.py | |
| ├── 40k_train.json | |
| ├── requirements.txt | |
| └── README.md | |
| ``` | |
| ## 📁 Vietnamese Question Generation Toolkit | |
| This repository includes four main entry points: | |
| * `main.py`: starts the local Flask web application with the current `backend/` and `frontend/`. | |
| * `fine_tune_qg.py`: fine-tunes the Vietnamese T5-based question generation model using `40k_train.json`. | |
| * `generate_question.py`: command-line script for generating questions from a Vietnamese passage. | |
| * `HVU_QA_tool.py`: one-file launcher that can prepare a standalone runtime, install missing dependencies, download the model from Hugging Face, and launch the web app automatically. | |
| ## 🛠️ Requirements | |
| * Python 3.10+ | |
| * `pip` | |
| * Optional: NVIDIA GPU with CUDA for faster inference | |
| ### 📦 Install Required Libraries | |
| For running the full repository locally: | |
| ```bash | |
| python -m venv venv | |
| # Windows | |
| venv\Scripts\activate | |
| # macOS / Linux | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| ``` | |
| If you want to use NVIDIA GPU, install the PyTorch build that matches your CUDA setup from [pytorch.org](https://pytorch.org) before installing the remaining requirements. | |
| `HVU_QA_tool.py` can also create its own virtual environment, prepare a standalone runtime, and sync the model automatically, so the manual installation steps above are mainly for direct repo usage. | |
| ### 📥 Load Dataset from Hugging Face Hub | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train") | |
| print(ds[0]) | |
| ``` | |
| ## 📚 Usage | |
| * Run the local web interface for question generation. | |
| * Generate questions from the command line. | |
| * Fine-tune or evaluate the Vietnamese question generation model. | |
| ### 🔹 Run the web app | |
| ```bash | |
| python main.py | |
| ``` | |
| Open `http://127.0.0.1:5000` in your browser. | |
| ### 🔹 Launch with `HVU_QA_tool.py` | |
| ```bash | |
| python HVU_QA_tool.py | |
| ``` | |
| This launcher is useful when you want the project to set itself up automatically. It can detect the local repo, prepare a standalone runtime when needed, install missing dependencies, download the model, and then start the web application. | |
| ### 🔹 Fine-tuning | |
| ```bash | |
| python fine_tune_qg.py | |
| ``` | |
| This will: | |
| 1. Load the dataset from `40k_train.json`. | |
| 2. Fine-tune `VietAI/vit5-base`. | |
| 3. Save the trained model into `t5-viet-qg-finetuned/`. | |
| *(Or download the pre-trained model: [t5-viet-qg-finetuned](https://huggingface.co/datasets/DANGDOCAO/GeneratingQuestions/tree/main).)* | |
| ### 🔹 Generating Questions | |
| ```bash | |
| python generate_question.py | |
| ``` | |
| **Example:** | |
| ``` | |
| Input passage: | |
| Cà phê sữa đá là một loại đồ uống nổi tiếng ở Việt Nam | |
| (Iced milk coffee is a famous drink in Vietnam) | |
| Number of questions: 5 | |
| ``` | |
| **Output:** | |
| ``` | |
| 1. Loại cà phê nào nổi tiếng ở Việt Nam? | |
| (What type of coffee is famous in Vietnam?) | |
| 2. Tại sao cà phê sữa đá lại phổ biến? | |
| (Why is iced milk coffee popular?) | |
| 3. Cà phê sữa đá bao gồm những nguyên liệu gì? | |
| (What ingredients are included in iced milk coffee?) | |
| 4. Cà phê sữa đá có nguồn gốc từ đâu? | |
| (Where does iced milk coffee originate from?) | |
| 5. Cà phê sữa đá Việt Nam được pha chế như thế nào? | |
| (How is Vietnamese iced milk coffee prepared?) | |
| ``` | |
| **You can adjust** in `generate_question.py`: | |
| * `--model_dir`, `--num_questions`, `--max_source_length`, `--max_new_tokens`, `--device`, `GENERATION_PASSES`, `no_repeat_ngram_size`, `repetition_penalty` | |
| ## 📌 Citation | |
| If you use **HVU_QA** in your research, please cite: | |
| ```bibtex | |
| @InProceedings{10.1007/978-981-92-2590-3_29, | |
| author="Nguyen-Tien, Ha | |
| and Le-Hong, Phuc | |
| and Do-Cao, Dang | |
| and NGUYEN, Hung-Cuong | |
| and Mai-Van, Chung", | |
| editor="Buntine, Wray | |
| and Fjeld, Morten | |
| and Sch{\"o}ffmann, Klaus | |
| and Tran The, Truyen | |
| and Tran, Minh-Triet | |
| and Binh, Huynh Thi Thanh | |
| and Dam, Tuan", | |
| title="A Method for Building QA Corpora for Low-Resource Languages", | |
| booktitle="Information and Communication Technology", | |
| year="2026", | |
| publisher="Springer Nature Singapore", | |
| address="Singapore", | |
| pages="352--363", | |
| isbn="978-981-92-2590-3" | |
| } | |
| ``` | |
| ## ❤️ Support / Funding | |
| If you find **HVU_QA** useful, please consider supporting our work. | |
| Your contributions help us maintain the dataset, improve quality, and release new versions (cleaning, expansion, benchmarks, and tools). | |
| ### 🇻🇳 Donate via VietQR (scan to support) | |
| This **VietQR / NAPAS 247** code can be scanned by Vietnamese banking apps and some international payment apps that support QR bank transfers. | |
| <img src="QRtk.jpg" alt="VietQR Support" width="320"/> | |
| - 🏦 **Bank:** VietinBank (Vietnam) | |
| - 👤 **Account name:** NGUYEN TIEN HA | |
| - 💳 **Account number:** 103004492490 | |
| - 📍 **Branch:** VietinBank CN PHU THO - HOI SO | |
| ### 🌍 International Support (Quick card payment) | |
| If you are outside Vietnam, you can support this project via **Buy Me a Coffee** | |
| (no PayPal account needed - pay directly with a credit/debit card): | |
| - BuyMeACoffee: https://buymeacoffee.com/hanguyen0408 | |
| ### 🌍 International Support (PayPal) | |
| If you prefer PayPal, you can also support us here: | |
| - PayPal.me: https://paypal.me/HaNguyen0408 | |
| ### ✨ Other ways to support | |
| - ⭐ Star this repository / dataset on Hugging Face | |
| - 📌 Cite our paper if you use it in your research | |
| - 🐛 Open issues / pull requests to improve the dataset and tools | |
| ## 📬 Contact / Maintainers | |
| For questions, feedback, collaborations, or issue reports related to HVU_QA, please contact: | |
| Dr. Ha Nguyen (Project Lead) | |
| Hung Vuong University, Phu Tho, Vietnam | |
| Email: nguyentienha@hvu.edu.vn | |