class_docstr: A constraint on word substitutions which places a maximum distance
  between the embedding of the word being deleted and the word being
  inserted.
  
  Args:
      embedding (obj): Wrapper for word embedding.
      include_unknown_words (bool): Whether or not the constraint is fulfilled if the embedding of x or x_adv is unknown.
      min_cos_sim (:obj:`float`, optional): The minimum cosine similarity between word embeddings.
      max_mse_dist (:obj:`float`, optional): The maximum euclidean distance between word embeddings.
      cased (bool): Whether embedding supports uppercase & lowercase (defaults to False, or just lowercase).
      compare_against_original (bool):  If `True`, compare new `x_adv` against the original `x`. Otherwise, compare it against the previous `x_adv`.
class_docstr_tok: ["A","constraint","on","word","substitutions","which","places","a","maximum","distance","between","the","embedding","of","the","word","being","deleted","and","the","word","being","inserted",".","Args",":","embedding","(","obj",")",":","Wrapper","for","word","embedding",".","include_unknown_words","(","bool",")",":","Whether","or","not","the","constraint","is","fulfilled","if","the","embedding","of","x","or","x_adv","is","unknown",".","min_cos_sim","(",":","obj",":","`","float","`",",","optional",")",":","The","minimum","cosine","similarity","between","word","embeddings",".","max_mse_dist","(",":","obj",":","`","float","`",",","optional",")",":","The","maximum","euclidean","distance","between","word","embeddings",".","cased","(","bool",")",":","Whether","embedding","supports","uppercase","&","lowercase","(","defaults","to","False",",","or","just","lowercase",")",".","compare_against_original","(","bool",")",":","If","`","True","`",",","compare","new","`","x_adv","`","against","the","original","`","x","`",".","Otherwise",",","compare","it","against","the","previous","`","x_adv","`","."]
docstr: Returns the cosine similarity of words with IDs a and b.
docstr_tok: ["Returns","the","cosine","similarity","of","words","with","IDs","a","and","b","."]
code: def get_cos_sim(self, a, b):
      """Returns the cosine similarity of words with IDs a and b."""
      return self.embedding.get_cos_sim(a, b)
  
file_path: TextAttack/textattack/constraints/semantics/word_embedding_distance.py
imports: from textattack.constraints import Constraint
  from textattack.shared import AbstractWordEmbedding, WordEmbedding
  from textattack.shared.validators import transformation_consists_of_word_swaps
label_desc: Use image node_id 2 for calling the WordEmbeddingDistance obj's underlying member method code with example usage: obj.get_cos_sim(a, b) and returns: self