code: function find_rule_local(gender, name, ruleset, match_whole_word, tags) {
          for (var i = 0; i < ruleset.length; i++) {
              var rule = ruleset[i];
              if (rule.tags) {
                  var common_tags = [];
                  for (var j = 0; j < rule.tags.length; j++) {
                      var tag = rule.tags[j];
                      if (!contains(tags, tag)) common_tags.push(tag);
                  }
                  if (!common_tags.length) continue;
              }
              if (rule.gender !== 'androgynous' && gender !== rule.gender)
                  continue;
  
              name = name.toLowerCase();
              for (var j = 0; j < rule.test.length; j++) {
                  var sample = rule.test[j];
                  var test = match_whole_word ? name :
                      name.substr(name.length - sample.length);
                  if (test === sample) return rule;
              }
          }
          return false;
      }
docs: Local search in rulesets of exceptions or suffixes