def build_dataset_for_inference(self, src_tokens, src_lengths, constraints=None):
    return LanguagePairDataset(src_tokens, src_lengths, self.source_dictionary, tgt_dict=self.target_dictionary, constraints=constraints)
def build_dataset_for_inference(self, src_tokens, src_lengths, constraints=None):
    return LanguagePairDataset(src_tokens, src_lengths, self.source_dictionary, tgt_dict=self.target_dictionary, constraints=constraints)