xmodaler.scorer¶
- class xmodaler.scorer.BaseScorer(*, types, scorers, weights, gt_path, eos_id)[source]¶
Bases:
object
- class xmodaler.scorer.Cider(*, n: int, sigma: float, cider_cached: str)[source]¶
Bases:
object
Main Class to compute the CIDEr metric
- compute_score(gts, res)[source]¶
Main function to compute CIDEr score :param hypo_for_image (dict) : dictionary with key <image> and value <tokenized hypothesis / candidate sentence>
ref_for_image (dict) : dictionary with key <image> and value <tokenized reference sentence>
- Returns:
cider (float) : computed CIDEr score for the corpus