<commit_before>var prompt = require('prompt');
var config = require(__dirname + '/resources/properties/config');
var fs = require('fs');

var loop = true;
var Menu = function()
{
	this.menuList = [];
};

Menu.prototype.addMenu = function(name, callback)
{
	this.menuList.push({name : name, callback : callback});
};

Menu.prototype.showMenu = function(loop, quitCallback)
{
	console.log();
	console.log(" -- imboard configuration -- ");
	for(var i=0; i<this.menuList.length; i++)
	{
		console.log((i+1) + ". " + this.menuList[i].name);
	}

	if(loop)
		console.log("q. quit");

	prompt.start();
	prompt.message = "";
	prompt.delimiter = "";

	var that = this;
	prompt.get(['select a menu : '], function (err, result)
	{
		if(err)
		{
			console.error(err);
			return;
		}

		var menu = result['select a menu : '];
		if(!menu || isNaN(menu))
		{
			console.log();
			console.log("selected menu is invalid");
			console.log("-----------------------------------------");

			if(loop)
			{
				that.showMenu(loop, quitCallback);
			}

			return;
		}
		else if(menu == "q")
		{
			if(quitCallback)
				quitCallback();
			return;
		}

		var callback = that.menuList[menu-1].callback;
		if(callback)<commit_msg>q 메뉴로 종료되지 않던문제 수정<commit_after>var prompt = require('prompt');
var config = require(__dirname + '/resources/properties/config');
var fs = require('fs');

var loop = true;
var Menu = function()
{
	this.menuList = [];
};

Menu.prototype.addMenu = function(name, callback)
{
	this.menuList.push({name : name, callback : callback});
};

Menu.prototype.showMenu = function(loop, quitCallback)
{
	console.log();
	console.log(" -- imboard configuration -- ");
	for(var i=0; i<this.menuList.length; i++)
	{
		console.log((i+1) + ". " + this.menuList[i].name);
	}

	if(loop)
		console.log("q. quit");

	prompt.start();
	prompt.message = "";
	prompt.delimiter = "";

	var that = this;
	prompt.get(['select a menu : '], function (err, result)
	{
		if(err)
		{
			console.error(err);
			return;
		}

		var menu = result['select a menu : '];
		if(menu == "q")
		{
			if(quitCallback)
				quitCallback();
			return;
		}
		else if(!menu || isNaN(menu))
		{
			console.log();
			console.log("selected menu is invalid");
			console.log("-----------------------------------------");

			if(loop)
			{
				that.showMenu(loop, quitCallback);
			}

			return;
		}

		var callback = that.menuList[menu-1].callback;
		if(callback)
{'fraction_non_alphanumeric': 0.21401907922024058, 'fraction_numerical': 0.002488593944421402, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 5, '<?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': '586920', 'n_tokens_mistral': 952, 'n_tokens_neox': 850, 'n_words': 167}