<commit_before>  /**
    @class
    <p>A basic filter score function, which mathces a filter and applies a
    weight.</p>

    @name ejs.FilterScoreFunction
    @ejs scorefunction
    @borrows ejs.ScoreFunctionMixin.filter as filter
    @borrows ejs.ScoreFunctionMixin.weight as weight
    @borrows ejs.ScoreFunctionMixin._type as _type
    @borrows ejs.ScoreFunctionMixin.toJSON as toJSON

    @desc
    <p>Randomly score documents.</p>

    */
  ejs.FilterScoreFunction = function (filter, weight) {

    var
      _common = ejs.ScoreFunctionMixin(),
      func = _common.toJSON();

    if ((filter == null || !isFilter(filter)) || weight == null) {
      throw new Error("filter must be a Filter and weight must be a Number");
    }

    func.filter = filter;
    func.weight = weight;

    return extend(_common, {});
  };<commit_msg>Use the basic mixin object directly<commit_after>  /**
    @class
    <p>A basic filter score function, which mathces a filter and applies a
    weight.</p>

    @name ejs.FilterScoreFunction
    @ejs scorefunction
    @borrows ejs.ScoreFunctionMixin.filter as filter
    @borrows ejs.ScoreFunctionMixin.weight as weight
    @borrows ejs.ScoreFunctionMixin._type as _type
    @borrows ejs.ScoreFunctionMixin.toJSON as toJSON

    @desc
    <p>Randomly score documents.</p>

    */
  ejs.FilterScoreFunction = function (filter, weight) {

    var
      _common = ejs.ScoreFunctionMixin();

    if (filter == null || weight == null) {
      throw new Error("Filter and weight is required");
    }

    _common.filter(filter);
    _common.weight(weight);

    return _common;
  };
{'fraction_non_alphanumeric': 0.1021039603960396, 'fraction_numerical': 0.0, 'mean_word_length': 3.0124069478908186, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '662938', 'n_tokens_mistral': 503, 'n_tokens_neox': 488, 'n_words': 140}