<commit_before>/*
 * Simple factory for Def
 * @lastmodifiedBy ChengFuLin(<EMAIL>)
 * @lastmodifiedDate 2015-08-05
 */
var Def = require('./def');

/**
 * DefFactory
 * @constructor
 */
function DefFactory() {
}

/* start-public-methods */
/**
 * Factory method for literal type definition
 * @param {FlowNode} from Node where the definition is generated
 * @param {Range|Array} range
 * @returns {Def} Definition object with literal type
 */
DefFactory.prototype.createLiteralDef = function (from, range) {<commit_msg>Re-add general factory method for Def objects<commit_after>/*
 * Simple factory for Def
 * @lastmodifiedBy ChengFuLin(<EMAIL>)
 * @lastmodifiedDate 2015-08-05
 */
var Def = require('./def');

/**
 * DefFactory
 * @constructor
 */
function DefFactory() {
}

/* start-public-methods */
/**
 * General factory method of Def objects
 * @param {FlowNode} from
 * @param {string} type
 * @param {Range|Array} range
 */
DefFactory.prototype.create = function (from, type, range) {
    "use strict";
    return new Def(from, type, range);
};

/**
 * Factory method for literal type definition
 * @param {FlowNode} from Node where the definition is generated
 * @param {Range|Array} range
 * @returns {Def} Definition object with literal type
 */
DefFactory.prototype.createLiteralDef = function (from, range) {
{'fraction_non_alphanumeric': 0.13474640423921272, 'fraction_numerical': 0.012112036336109008, 'mean_word_length': 4.2047244094488185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2321488', 'n_tokens_mistral': 394, 'n_tokens_neox': 375, 'n_words': 125}