[Person D] Implement evaluation module and inference scripts
#7
by jiaoruotong - opened
Summary
Implement the evaluation and inference module (Person D's assignment):
Evaluation metrics (src/easytranslate/evaluation/metrics.py)
- SacreBLEU with Chinese tokenization
- COMET neural evaluation metric
- chrF++ and TER metrics
Decoding strategies (src/easytranslate/evaluation/decoding.py)
- Greedy decoding
- Beam search with length penalty
- Sampling with temperature, top-k, and top-p
Evaluator (src/easytranslate/evaluation/evaluator.py)
- Unified evaluation interface
- Batch evaluation support
Scripts
scripts/evaluate.py: Evaluation entry pointscripts/translate.py: CLI interactive translation + file translation
jiaoruotong changed pull request status to closed