primeqa.ir.dense.dpr_top.dpr.dpr_util.queries_to_vectors#
- primeqa.ir.dense.dpr_top.dpr.dpr_util.queries_to_vectors(tokenizer: Union[transformers.models.rag.tokenization_rag.RagTokenizer, transformers.models.dpr.tokenization_dpr.DPRQuestionEncoderTokenizer, transformers.models.dpr.tokenization_dpr_fast.DPRQuestionEncoderTokenizerFast], question_encoder, queries: Union[List[str], List[Tuple[str, str]]], *, max_query_length=None)#
- Parameters
tokenizer – a RagTokenizer (the question_encoder will be used) or a DPRQuestionEncoderTokenizer
question_encoder –
queries – list of string queries or list of title/text pairs
max_query_length –
- Returns