code: function splitRules(rules) {
      var res = {};
      var nonWordRules = [];
      rules.forEach(function (rule) {
          if (rule.type === IMatch.EnumRuleType.WORD) {
              if (!rule.lowercaseword) {
                  throw new Error("Rule has no member lowercaseword" + JSON.stringify(rule));
              }
              res[rule.lowercaseword] = res[rule.lowercaseword] || { bitindex: 0, rules: [] };
              res[rule.lowercaseword].bitindex = res[rule.lowercaseword].bitindex | rule.bitindex;
              res[rule.lowercaseword].rules.push(rule);
          }
          else {
              nonWordRules.push(rule);
          }
      });
      return {
          wordMap: res,
          nonWordRules: nonWordRules,
          allRules: rules,
          wordCache: {}
      };
  }
docs: loadmodel