<commit_before>/**
 * Decypher Query Builder
 * =======================
 *
 * Simple cypher query builder.
 */
var utils = require('./utils.js'),
    assign = utils.assign,
    isPlainObject = utils.isPlainObject,
    helpers = require('./helpers.js'),
    relationshipPattern = helpers.relationshipPattern,
    Expression = require('./expression.js');

var STATEMENTS = require('./syntax.js').STATEMENTS;

/**
 * Helpers.
 */
function capitalize(string) {
  return string.charAt(0).toUpperCase(string) + string.slice(1);
}

/**
 * Class.
 */
function Query() {

  if (!(this instanceof Query))
    return new Query();

  // Properties
  this._segments = [];
  this._params = {};
}

// Appending a segment to the query
Query.prototype.segment = function() {
  var query = new Query();

  this._segments.push(query);
  return query;
};<commit_msg>Query.prototype.segment accepts an input query.<commit_after>/**
 * Decypher Query Builder
 * =======================
 *
 * Simple cypher query builder.
 */
var utils = require('./utils.js'),
    assign = utils.assign,
    isPlainObject = utils.isPlainObject,
    helpers = require('./helpers.js'),
    relationshipPattern = helpers.relationshipPattern,
    Expression = require('./expression.js');

var STATEMENTS = require('./syntax.js').STATEMENTS;

/**
 * Helpers.
 */
function capitalize(string) {
  return string.charAt(0).toUpperCase(string) + string.slice(1);
}

/**
 * Class.
 */
function Query() {

  if (!(this instanceof Query))
    return new Query();

  // Properties
  this._segments = [];
  this._params = {};
}

// Appending a segment to the query
Query.prototype.segment = function(inputQuery) {
  var query = (inputQuery instanceof Query ? inputQuery : new Query());

  this._segments.push(query);
  return query;
};
{'fraction_non_alphanumeric': 0.17798989331836046, 'fraction_numerical': 0.0022459292532285235, 'mean_word_length': 3.640625, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5460028', 'n_tokens_mistral': 541, 'n_tokens_neox': 530, 'n_words': 124}