docstr: Make a semantic similarity estimate of two keys or two sets of keys.
  The default estimate is cosine similarity using an average of vectors.
  
  keys_a (unicode / int / iterable): The string or integer key(s).
  keys_b (unicode / int / iterable): The other string or integer key(s).
  RETURNS (float): The similarity score.
docstr_tok: ["Make","a","semantic","similarity","estimate","of","two","keys","or","two","sets","of","keys",".","The","default","estimate","is","cosine","similarity","using","an","average","of","vectors",".","keys_a","(","unicode","\/","int","\/","iterable",")",":","The","string","or","integer","key","(","s",")",".","keys_b","(","unicode","\/","int","\/","iterable",")",":","The","other","string","or","integer","key","(","s",")",".","RETURNS","(","float",")",":","The","similarity","score","."]
code: def similarity(
      self,
      keys_a: Union[Sequence[Union[str, int]], str, int],
      keys_b: Union[Sequence[Union[str, int]], str, int],
  ) -> float:
      """Make a semantic similarity estimate of two keys or two sets of keys.
      The default estimate is cosine similarity using an average of vectors.
  
      keys_a (unicode / int / iterable): The string or integer key(s).
      keys_b (unicode / int / iterable): The other string or integer key(s).
      RETURNS (float): The similarity score.
      """
      if isinstance(keys_a, (str, int)):
          keys_a = [keys_a]
      if isinstance(keys_b, (str, int)):
          keys_b = [keys_b]
      average_a = numpy.vstack([self[key] for key in keys_a]).mean(
          axis=0
      )
      average_b = numpy.vstack([self[key] for key in keys_b]).mean(
          axis=0
      )
      return cosine_similarity(average_a, average_b)
  
imports: from typing import Tuple, List, Union, Sequence, Dict, Callable, Any
  from pathlib import Path
  from spacy.vectors import Vectors
  from spacy.strings import StringStore
  from spacy.util import SimpleFrozenDict
  from thinc.api import NumpyOps
  import numpy
  import srsly
  from .util import registry, cosine_similarity
label_desc: Use image node_id 19 for calling the Sense2Vec obj's underlying member method code with example usage: obj.similarity(keys_a, keys_b) and returns: cosine_similarity