code: function dropLowerRankedEqualResult(res) {
      res.sort(cmpByResultThenRank);
      return res.filter(function (resx, index) {
          var prior = res[index - 1];
          if (prior &&
              !(resx.rule && resx.rule.range)
              && !(res[index - 1].rule && res[index - 1].rule.range)
              && (resx.matchedString === prior.matchedString)
              && (resx.rule.bitindex === prior.rule.bitindex)
              && (resx.rule.wordType === prior.rule.wordType)
              && (resx.category === res[index - 1].category)) {
              return false;
          }
          return true;
      });
  }
docs: /*
  export function postFilter(res : Array<IFMatch.ICategorizedString>) : Array<IFMatch.ICategorizedString> {
  res.sort(sortByRank);
  var bestRank = 0;
  console.log("\npiltered " + JSON.stringify(res));
  debuglog(()=> "preFilter : \n" + res.map(function(word,index) {
  return `${index} ${word._ranking}  => "${word.category}" ${word.matchedString}`;
  }).join("\n"));
  var r = res.filter(function(resx,index) {
  if(index === 0) {
  bestRank = resx._ranking;
  return true;
  }
  1-0.9 = 0.1
  1- 0.93 = 0.7
  1/7
  var delta = bestRank / resx._ranking;
  if((resx.matchedString === res[index-1].matchedString)
  && (resx.category === res[index-1].category)
  ) {
  debuglog('postfilter ignoring bitinidex!!!');
  return false;
  }
  console.log("\n delta for " + delta + "  " + resx._ranking);
  if (resx.levenmatch && (delta > 1.03)) {
  return false;
  }
  return true;
  });
  debuglog(()=> `\nfiltered ${r.length}/${res.length}` + JSON.stringify(r));
  return r;
  }