code: def WRatio(s1, s2, force_ascii=True, full_process=True):
      if full_process:
          p1 = utils.full_process(s1, force_ascii=force_ascii)
          p2 = utils.full_process(s2, force_ascii=force_ascii)
      else:
          p1 = s1
          p2 = s2
      if not utils.validate_string(p1):
          return 0
      if not utils.validate_string(p2):
          return 0
      try_partial = True
      unbase_scale = .95
      partial_scale = .90
      base = ratio(p1, p2)
      len_ratio = float(max(len(p1), len(p2))) / min(len(p1), len(p2))
      if len_ratio < 1.5:
          try_partial = False
      if len_ratio > 8:
          partial_scale = .6
      if try_partial:
          partial = partial_ratio(p1, p2) * partial_scale
          ptsor = partial_token_sort_ratio(p1, p2, full_process=False) \
              * unbase_scale * partial_scale
          ptser = partial_token_set_ratio(p1, p2, full_process=False) \
              * unbase_scale * partial_scale
          return utils.intr(max(base, partial, ptsor, ptser))
      else:
          tsor = token_sort_ratio(p1, p2, full_process=False) * unbase_scale
          tser = token_set_ratio(p1, p2, full_process=False) * unbase_scale
          return utils.intr(max(base, tsor, tser))