original_docstring: 
      Measure the similarity between two strings or sequences of strings using
      Jaccard distance, with optional fuzzy matching of not-identical pairs
      when ``obj1`` and ``obj2`` are sequences of strings.
  
      Args:
          obj1
          obj2: If str, both inputs are treated as sequences of *characters*,
              in which case fuzzy matching is not permitted
          fuzzy_match: If True, allow for fuzzy matching in addition to the
              usual identical matching of pairs between input vectors
          match_threshold: Value in the interval [0.0, 1.0]; fuzzy comparisons
              with a score >= this value will be considered matches
  
      Returns:
          Similarity between ``obj1`` and ``obj2`` in the interval [0.0, 1.0],
          where larger values correspond to more similar strings or sequences of strings
  
      Raises:
          ValueError: if ``fuzzy_match`` is True but ``obj1`` and ``obj2`` are strings,
          or if ``match_threshold`` is not a valid float
      
docstring: 
  
  obj1
  obj2: If str, both inputs are treated as sequences of *characters*,
  in which case fuzzy matching is not permitted
  fuzzy_match: If True, allow for fuzzy matching in addition to the
  usual identical matching of pairs between input vectors
  match_threshold: Value in the interval [0.0, 1.0]; fuzzy comparisons
  with a score >= this value will be considered matches
  
  
  
  
docstring_tokens: obj1 obj2 : If str both inputs are treated as sequences of * characters * in which case fuzzy matching is not permitted fuzzy_match : If True allow for fuzzy matching in addition to the usual identical matching of pairs between input vectors match_threshold : Value in the interval [ 0 . 0 1 . 0 ] ; fuzzy comparisons with a score > = this value will be considered matches
code: def jaccard(
      obj1: Union[str, Sequence[str]],
      obj2: Union[str, Sequence[str]],
      fuzzy_match: bool = False,
      match_threshold: float = 0.8,
  ) -> float:
      """
      Measure the similarity between two strings or sequences of strings using
      Jaccard distance, with optional fuzzy matching of not-identical pairs
      when ``obj1`` and ``obj2`` are sequences of strings.
  
      Args:
          obj1
          obj2: If str, both inputs are treated as sequences of *characters*,
              in which case fuzzy matching is not permitted
          fuzzy_match: If True, allow for fuzzy matching in addition to the
              usual identical matching of pairs between input vectors
          match_threshold: Value in the interval [0.0, 1.0]; fuzzy comparisons
              with a score >= this value will be considered matches
  
      Returns:
          Similarity between ``obj1`` and ``obj2`` in the interval [0.0, 1.0],
          where larger values correspond to more similar strings or sequences of strings
  
      Raises:
          ValueError: if ``fuzzy_match`` is True but ``obj1`` and ``obj2`` are strings,
          or if ``match_threshold`` is not a valid float
      """
      if not 0.0 <= match_threshold <= 1.0:
          raise ValueError(
              "match_threshold={} is invalid; "
              "it must be a float in the interval [0.0, 1.0]".format(match_threshold)
          )
      set1 = set(obj1)
      set2 = set(obj2)
      intersection = len(set1 & set2)
      union = len(set1 | set2)
      if (
          fuzzy_match is True
          and not isinstance(obj1, (str, bytes))
          and not isinstance(obj2, (str, bytes))
      ):
          for item1 in set1.difference(set2):
              if max(token_sort_ratio(item1, item2) for item2 in set2) >= match_threshold:
                  intersection += 1
          for item2 in set2.difference(set1):
              if max(token_sort_ratio(item2, item1) for item1 in set1) >= match_threshold:
                  intersection += 1
      elif fuzzy_match is True:
          raise ValueError("fuzzy matching not possible with str inputs")
  
      return intersection / union
code_tokens: def jaccard ( obj1 : Union [ str , Sequence [ str ] ] , obj2 : Union [ str , Sequence [ str ] ] , fuzzy_match : bool = False , match_threshold : float = 0.8 , ) -> float : if not 0.0 <= match_threshold <= 1.0 : raise ValueError ( "match_threshold={} is invalid; " "it must be a float in the interval [0.0, 1.0]" . format ( match_threshold ) ) set1 = set ( obj1 ) set2 = set ( obj2 ) intersection = len ( set1 & set2 ) union = len ( set1 | set2 ) if ( fuzzy_match is True and not isinstance ( obj1 , ( str , bytes ) ) and not isinstance ( obj2 , ( str , bytes ) ) ) : for item1 in set1 . difference ( set2 ) : if max ( token_sort_ratio ( item1 , item2 ) for item2 in set2 ) >= match_threshold : intersection += 1 for item2 in set2 . difference ( set1 ) : if max ( token_sort_ratio ( item2 , item1 ) for item1 in set1 ) >= match_threshold : intersection += 1 elif fuzzy_match is True : raise ValueError ( "fuzzy matching not possible with str inputs" ) return intersection / union
short_docstring: Measure the similarity between two strings or sequences of strings using
  Jaccard distance, with optional fuzzy matching of not-identical pairs
  when ``obj1`` and ``obj2`` are sequences of strings.
short_docstring_tokens: Measure the similarity between two strings or sequences of strings using Jaccard distance with optional fuzzy matching of not - identical pairs when ` ` obj1 ` ` and ` ` obj2 ` ` are sequences of strings .
comment: """
      Measure the similarity between two strings or sequences of strings using
      Jaccard distance, with optional fuzzy matching of not-identical pairs
      when ``obj1`` and ``obj2`` are sequences of strings.
  
      Args:
          obj1
          obj2: If str, both inputs are treated as sequences of *characters*,
              in which case fuzzy matching is not permitted
          fuzzy_match: If True, allow for fuzzy matching in addition to the
              usual identical matching of pairs between input vectors
          match_threshold: Value in the interval [0.0, 1.0]; fuzzy comparisons
              with a score >= this value will be considered matches
  
      Returns:
          Similarity between ``obj1`` and ``obj2`` in the interval [0.0, 1.0],
          where larger values correspond to more similar strings or sequences of strings
  
      Raises:
          ValueError: if ``fuzzy_match`` is True but ``obj1`` and ``obj2`` are strings,
          or if ``match_threshold`` is not a valid float
      """