Views
No views yet
1from sentinel_metric import download_model, load_from_checkpoint
2
3model_path = download_model("sapienzanlp/sentinel-ref-mqm")
4model = load_from_checkpoint(model_path)
5
6data = [
7 {"ref": "There's no place like home."},
8 {"ref": "Toto, I've a feeling we're not in Kansas anymore."}
9]
10
11output = model.predict(data, batch_size=8, gpus=1)1# Segment scores
2>>> output.scores
3[0.5577929019927979, 0.3894208073616028]
4
5# System score
6>>> output.system_score
70.47360685467720031@inproceedings{perrella-etal-2024-guardians,
2 title = "Guardians of the Machine Translation Meta-Evaluation: Sentinel Metrics Fall In!",
3 author = "Perrella, Stefano and Proietti, Lorenzo and Scir{\`e}, Alessandro and Barba, Edoardo and Navigli, Roberto",
4 editor = "Ku, Lun-Wei and Martins, Andre and Srikumar, Vivek",
5 booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
6 month = aug,
7 year = "2024",
8 address = "Bangkok, Thailand", publisher = "Association for Computational Linguistics",
9 url = "https://aclanthology.org/2024.acl-long.856",
10 pages = "16216--16244",
11}