A toolkit for Vietnamese Paraphrase Generation and Evaluation.
Project description
VietQuill: A toolkit for Vietnamese Paraphrase Generation and Evaluation
English | Tiếng Việt
VietQuill is a unified framework for Vietnamese paraphrase generation, evaluation, and quality control, supporting both research and production applications.
It centralizes datasets, generation methods, augmentation techniques, and evaluation metrics into a consistent interface, enabling researchers and practitioners to develop, benchmark, and deploy paraphrase systems with minimal effort. VietQuill aims to serve as a common foundation for the Vietnamese paraphrase generation ecosystem, promoting reproducible research, standardized evaluation, and the development of high-quality paraphrase technologies for education, information retrieval, question answering, conversational AI, and other natural language processing applications.
We are committed to advancing Vietnamese paraphrase generation by making state-of-the-art methods accessible, customizable, and easy to integrate into real-world workflows.
Installation
Create and activate a virtual environment with venv and project manager.
python -m venv .\venv
Install VietQuill in your virtual environment.
pip install vietquill
Quickstart
Paraphrase Generate
Using QualityControlParaphraser for fine-grained control over lexical, semantic, and syntactic attributes.
from vietquill.generation import QualityControlParaphraser
paraphraser = QualityControlParaphraser()
paraphraser.load_model(model_type="all") # "all" or "question" or "sentence"
sentences = [
"Hôm nay trời đẹp quá, mình muốn đi dạo công viên.",
"Thủ đô của nước Pháp là thành phố nào?",
"Quán phở nào ngon nhất ở khu vực Hà Nội?",
]
for sentence in sentences:
paraphrase = paraphraser.paraphrase(sentence, num_candidates=2)
print(f"Original: {sentence}")
print(f"Paraphrase: {paraphrase}")
# >>> Original: Hôm nay trời đẹp quá, mình muốn đi dạo công viên.
# >>> Paraphrase: ['Hôm nay trời đẹp, tôi muốn đi dạo công viên.', 'Hôm nay trời đẹp quá, tôi muốn đi dạo công viên.']
# >>> Original: Thủ đô của nước Pháp là thành phố nào?
# >>> Paraphrase: ['Nước Pháp có thủ đô là thành phố nào?', 'Nước Pháp có thủ đô là thành phố tên gì?']
# >>> Original: Quán phở nào ngon nhất ở khu vực Hà Nội?
# >>> Paraphrase: ['Ở Hà Nội, quán phở nào ngon nhất?', 'Món ăn nào là món ăn ngon nhất ở Hà Nội?']
Paraphrase Evaluate
Evaluate the quality of generated paraphrases using various metrics and estimators.
Metrics and Metric-based Estimator
from vietquill.evaluation import BLEUMetric, LexicalEstimator
# Reference and candidate sentences
original = "Hôm nay trời đẹp quá, mình muốn đi dạo công viên."
paraphrase = "Thời tiết hôm nay thật tuyệt, tôi muốn tản bộ trong công viên."
# 1. Traditional Metrics
bleu = BLEUMetric()
score = bleu.score(original, paraphrase)
# >>> 0.1543
# 2. Aspect Estimators (Lexical, Semantic, Syntactic)
lex_est = LexicalEstimator()
estimation = lex_est.estimate(original, paraphrase)
# >>> { "lexical_score": 84.21 }
Neural-based Estimator
from vietquill.evaluation import NeuralEstimator
original = "Hôm nay trời đẹp quá, mình muốn đi dạo công viên."
paraphrase = "Thời tiết hôm nay thật tuyệt, tôi muốn tản bộ trong công viên."
estimator = NeuralEstimator()
result = estimator.estimate(original, paraphrase)
print(result)
# >>> {
# >>> "lexical_score": 82.5,
# >>> "syntactic_score": 55.0,
# >>> "semantic_score": 95.2
# >>> }
Why should I use VietQuill?
VietQuill is designed to be the most comprehensive and effective toolkit for Vietnamese paraphrase generation and evaluation. Here is why you should choose it:
- Seamless Integration: Designed with a clean and intuitive API, allowing VietQuill to be easily integrated into existing NLP workflows, research pipelines, and production systems.
- State-of-the-Art Paraphrase Generation: Built upon strong Vietnamese language models and quality-controlled generation techniques to deliver high-quality, diverse, and semantically faithful paraphrases.
Citation
Please CITE our paper when VietQuill is used to help produce published results or is incorporated into other software.
TODO
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vietquill-0.1.0.tar.gz.
File metadata
- Download URL: vietquill-0.1.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
608b3080c53f0df7fc099ada7a135684ed4e48ecdeb7ba151c1d52766e750abd
|
|
| MD5 |
e9733acc7af30f4895bb52cc269ded6b
|
|
| BLAKE2b-256 |
c8daf7f651164931ba56a9815c97dadb3706ac9b57fa1291a16ae9602135aa15
|
File details
Details for the file vietquill-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vietquill-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d74e46fd6181f060ceb3636297787701d49d283fc1463ee23d39b963d3e3e1dd
|
|
| MD5 |
8f8cc4055320ee097644c96a29efcbb2
|
|
| BLAKE2b-256 |
170131b94df5b662e552fc4010312d77222afa38ee12ee8fe0a8d7719d6828a8
|