This is a AfriCOMET-STL (single task) evaluation model: It receives a triplet with (source sentence, translation, reference translation) and returns a score that reflects the quality of the translation compared to both source and reference.
1from comet import download_model, load_from_checkpoint
23model_path = download_model("masakhane/africomet-stl")4model = load_from_checkpoint(model_path)5data =[6{7"src":"Nadal sàkọọ́lẹ̀ ìforígbárí o ní àmì méje sóódo pẹ̀lú ilẹ̀ Canada.",8"mt":"Nadal's head to head record against the Canadian is 7–2.",9"ref":"Nadal scored seven unanswered points against Canada."10},11{12"src":"Laipe yi o padanu si Raoniki ni ere Sisi Brisbeni.",13"mt":"He recently lost against Raonic in the Brisbane Open.",14"ref":"He recently lost to Raoniki in the game Sisi Brisbeni."15}16]17model_output = model.predict(data, batch_size=8, gpus=1)18print(model_output)
Intended uses
Our model is intented to be used for MT evaluation.
Given a triplet with (source sentence, translation, reference translation), it outputs a single score between 0 and 1 where 1 represents a perfect translation.
Languages Covered:
This model builds on top of AfroXLMR which cover the following languages: