text_similarity

text_similarity#

class TextSimilarityTask(task, model, batch_size=1, max_length=384, **kwargs)[源代码]#

基类:Task

Text similarity task using SimBERT to predict the similarity of sentence pair. :param task: The name of task. :type task: string :param model: The model name in the task. :type model: string :param kwargs: Additional keyword arguments passed along to the specific task. :type kwargs: dict, optional