docs: function getDomainCategoryFilterForTargetCategories(model, categories, wordsonly) {
      var res = {};
      //
      var fn = wordsonly ? getPotentialWordCategoriesForDomain : getCategoriesForDomain;
      var domains = undefined;
      categories.forEach(function (category) {
          var catdomains = getDomainsForCategory(model, category);
          if (!domains) {
              domains = catdomains;
          }
          else {
              domains = _.intersection(domains, catdomains);
          }
      });
      if (domains.length === 0) {
          throw new Error('categories ' + Utils.listToQuotedCommaAnd(categories) + ' have no common domain.');
      }
      domains.forEach(function (domain) {
          fn(model, domain).forEach(function (wordcat) {
              res[wordcat] = true;
          });
      });
      Object.freeze(res);
      return {
          domains: domains,
          categorySet: res
      };
  }