[Person D] Implement evaluation module and inference scripts

#7

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 point
  • scripts/translate.py: CLI interactive translation + file translation
jiaoruotong changed pull request status to closed

Sign up or log in to comment