<commit_before>var nodehun = require('./../lib/index.js'),
	Dictionary = nodehun.Dictionary,
	mctime = require('microtime'),
	unit = typeof mctime !== "undefined" ? "μs":"ms",
	time = typeof mctime !== "undefined" ? mctime.now : Date.now;
var timeInit = time();
var dict = new Dictionary('en_US');
console.log('time to initialize dictionary class:',time() - timeInit,unit);
timeInit = time();
dict.spellSuggest('Tacoma',function(a,b){console.log('misspelling "Tacoma"',a,b,'time to receive result:',time() - timeInit,unit)});
dict.spellSuggestions('calor',function(a,b){console.log('misspelling "calor"',a,b)});

dict.spellSuggest('color',function(a,b){console.log('correct "color"',a,b)});
dict.spellSuggestions('color',function(a,b){console.log('correct "color"',a,b)});<commit_msg>Test reflects passing raw string at initialization.<commit_after>var nodehun = require('./../lib/index.js'),
Dictionary = nodehun.Dictionary;
var fs = require('fs'),
mctime = require('microtime'),
unit = typeof mctime !== "undefined" ? "μs":"ms",
time = typeof mctime !== "undefined" ? mctime.now : Date.now;

var affbuf = fs.readFileSync(__dirname+'/../dictionaries/en_US/en_US.aff').toString();
var dictbuf = fs.readFileSync(__dirname+'/../dictionaries/en_US/en_US.dic').toString();
var timeInit = time();
//var dict = new Dictionary('en_US');
var dict = new Dictionary(affbuf,dictbuf);
console.log('time to initialize dictionary class:',time() - timeInit,unit);
timeInit = time();
dict.spellSuggest('Tacoma',function(a,b){console.log('misspelling "Tacoma"',a,b,'time to receive result:',time() - timeInit,unit)});
dict.spellSuggestions('calor',function(a,b){console.log('misspelling "calor"',a,b)});

dict.spellSuggest('color',function(a,b){console.log('correct "color"',a,b)});
dict.spellSuggestions('color',function(a,b){console.log('correct "color"',a,b)});
{'fraction_non_alphanumeric': 0.2089875473741202, 'fraction_numerical': 0.0, 'mean_word_length': 7.716981132075472, 'pattern_counts': {'":': 2, '<': 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': '7610998', 'n_tokens_mistral': 633, 'n_tokens_neox': 630, 'n_words': 108}