docstr: Constraint using similarity between sentence encodings of origin and
  translate where the text embeddings are created using the DeCLUTR.
  
  :param ~textflint.input.dataset origin_dataset:
      the dataset of origin sample
  :param ~textflint.input.dataset trans_dataset:
      the dataset of translate sample
  :param str|list fields: the name of the origin field need compare.
code: def __init__(self, origin_dataset, trans_dataset, fields):
      r"""
      Constraint using similarity between sentence encodings of origin and
      translate where the text embeddings are created using the DeCLUTR.
  
      :param ~textflint.input.dataset origin_dataset:
          the dataset of origin sample
      :param ~textflint.input.dataset trans_dataset:
          the dataset of translate sample
      :param str|list fields: the name of the origin field need compare.
  
      """
      super().__init__(origin_dataset, trans_dataset, fields)
      r"""
          :param ~textflint.input.dataset origin_dataset: 
              the dataset of origin sample
          :param ~textflint.input.dataset trans_dataset: 
              the dataset of translate sample
          :param str|list fields: the name of the origin field need compare.
          """
      self.sim_metric = torch.nn.CosineSimilarity(dim=1)
      self.tokenizer = AutoTokenizer.from_pretrained(SEMANTIC_ENCODER)
      self.model = AutoModel.from_pretrained(SEMANTIC_ENCODER)
  
file_path: textflint/textflint/generation/validator/sentence_encoding.py
imports: import torch
  from transformers import AutoModel, AutoTokenizer
  from .validator import Validator
label_desc: Use image node_id 1 to create a new SentenceEncoding object from inherited base classes: Validator with example: obj = SentenceEncoding(origin_dataset, trans_dataset, fields)