from .encoder import refine_scores