<commit_before>module.exports = function (grunt) {
  'use strict';

  var excision = require('./lib/excision').init(grunt);

  grunt.registerMultiTask('excision', 'Extract parts from one file into another.', function () {
    var options = this.options();

    if (!options.lines) {
      options.lines = {};
    }

    this.files.forEach(function (filePair) {
      var dest = filePair.dest,
          results = '',
          errors = [];

      filePair.src.forEach(function (src) {
        var contents = grunt.file.read(src),
            range = options.ranges[src];

        results += excision.process(range, contents);
      });

      if (options.validate) {
        errors = excision.validate(results, options.validate.lang);

        if (errors.length && !options.validate.tolerant) {
          return;
        }<commit_msg>options.lines -> options.ranges<commit_after>module.exports = function (grunt) {
  'use strict';

  var excision = require('./lib/excision').init(grunt);

  grunt.registerMultiTask('excision', 'Extract parts from one file into another.', function () {
    var options = this.options();

    if (!options.ranges) {
      options.ranges = {};
    }

    this.files.forEach(function (filePair) {
      var dest = filePair.dest,
          results = '',
          errors = [];

      filePair.src.forEach(function (src) {
        var contents = grunt.file.read(src),
            range = options.ranges[src];

        results += excision.process(range, contents);
      });

      if (options.validate) {
        errors = excision.validate(results, options.validate.lang);

        if (errors.length && !options.validate.tolerant) {
          return;
        }
{'fraction_non_alphanumeric': 0.14218009478672985, 'fraction_numerical': 0.0, 'mean_word_length': 2.446938775510204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4507971', 'n_tokens_mistral': 494, 'n_tokens_neox': 472, 'n_words': 99}