<commit_before>const Stream = require('stream');
const Util = require('util');

/**
 * @const
 * @type {RegExp}
 */
const PARSE_FLOAT_TEST = /^[0-9]+(?:\.[0-9]*)?(?:[eE]\+[0-9]+)?$|^(?:[0-9]+)?\.[0-9]+(?:e+[0-9]+)?$|^[-+]?Infinity$|^[-+]?NaN$/;

const Transform = Stream.Transform;

/**
 * @param {Object?} options
 * @param {string} [options.delimiter=','] - Specify what is the CSV delimeter
 * @param {boolean} [options.multiline=true] - Support Excel-like multiline CSV
 * @param {boolean} [options.allowQuotes=true] - Allow quotation marks to wrap columns
 * @param {boolean} [options.skipEmptyLines=false] - Should empty lines be automatically skipped?
 * @param {boolean} [options.parseNumbers=false] - Automatically parse numbers (with a . as the decimal separator)
 * @param {boolean} [options.parseBooleans=false] - Automatically parse booleans (strictly lowercase `true` and `false`)
 * @param {boolean} [options.ltrim=false] - Automatically left-trims columns
 * @param {boolean} [options.rtrim=false] - Automatically right-trims columns
 * @param {boolean} [options.trim=false] - If true, then both 'ltrim' and 'rtrim' are set to true
 * @param {boolean} [options.skipHeader=false] - If true, then skip the first header row
 * @param {boolean} [options.asObject=false] - If true, each row will be converted automatically to an object based
 *                                             on the header. This implied `skipHeader=true`.
 * @returns {CsvReadableStream}<commit_msg>Parse negative floats (Fixes #18)<commit_after>const Stream = require('stream');
const Util = require('util');

/**
 * @const
 * @type {RegExp}
 */
const PARSE_FLOAT_TEST = /^[-+]?[0-9]+(?:\.[0-9]*)?(?:[eE]\+[0-9]+)?$|^(?:[0-9]+)?\.[0-9]+(?:e+[0-9]+)?$|^[-+]?Infinity$|^[-+]?NaN$/;

const Transform = Stream.Transform;

/**
 * @param {Object?} options
 * @param {string} [options.delimiter=','] - Specify what is the CSV delimeter
 * @param {boolean} [options.multiline=true] - Support Excel-like multiline CSV
 * @param {boolean} [options.allowQuotes=true] - Allow quotation marks to wrap columns
 * @param {boolean} [options.skipEmptyLines=false] - Should empty lines be automatically skipped?
 * @param {boolean} [options.parseNumbers=false] - Automatically parse numbers (with a . as the decimal separator)
 * @param {boolean} [options.parseBooleans=false] - Automatically parse booleans (strictly lowercase `true` and `false`)
 * @param {boolean} [options.ltrim=false] - Automatically left-trims columns
 * @param {boolean} [options.rtrim=false] - Automatically right-trims columns
 * @param {boolean} [options.trim=false] - If true, then both 'ltrim' and 'rtrim' are set to true
 * @param {boolean} [options.skipHeader=false] - If true, then skip the first header row
 * @param {boolean} [options.asObject=false] - If true, each row will be converted automatically to an object based
 *                                             on the header. This implied `skipHeader=true`.
 * @returns {CsvReadableStream}
{'fraction_non_alphanumeric': 0.1670549084858569, 'fraction_numerical': 0.008652246256239601, 'mean_word_length': 4.310954063604241, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4748060', 'n_tokens_mistral': 949, 'n_tokens_neox': 925, 'n_words': 273}