<commit_before>/// @file
/// @author uentity
/// @date 26.10.2016
/// @brief BS kernel tools implementation
/// @copyright
/// This Source Code Form is subject to the terms of the Mozilla Public License,
/// v. 2.0. If a copy of the MPL was not distributed with this file,
/// You can obtain one at https://mozilla.org/MPL/2.0/

#include <bs/kernel_tools.h>
#include <bs/kernel.h>
#include <sstream>

namespace blue_sky { namespace kernel_tools {
using namespace std;

std::string print_loaded_types() {
	ostringstream outs;
	kernel& k = give_kernel::Instance();
	outs << "------------------------------------------------------------------------" << endl;
	outs << "List of loaded BlueSky types {" << endl;
	kernel::plugins_enum plugins = k.loaded_plugins();
	kernel::types_enum tp;
	for(const auto& plug : plugins) {
		outs << "Plugin: " << plug->name << ", version " << plug->version << " {" << endl;
		const auto& types = k.plugin_types(*plug);
		for(const auto& t : types) {
			outs << "	`" << t.td().name << "` -> " << t.td().description << endl;
		}
		outs << "}" << endl;
	}

	outs << "} end of BlueSky types list" << endl;
	outs << "------------------------------------------------------------------------" << endl;
	return outs.str();
}

	
}} /* namespace blue_sky::kernel_tools */
<commit_msg>kernel_tools: print plugin description, tweak printing format<commit_after>/// @file
/// @author uentity
/// @date 26.10.2016
/// @brief BS kernel tools implementation
/// @copyright
/// This Source Code Form is subject to the terms of the Mozilla Public License,
/// v. 2.0. If a copy of the MPL was not distributed with this file,
/// You can obtain one at https://mozilla.org/MPL/2.0/

#include <bs/kernel_tools.h>
#include <bs/kernel.h>
#include <sstream>

namespace blue_sky { namespace kernel_tools {
using namespace std;

std::string print_loaded_types() {
	ostringstream outs;
	kernel& k = give_kernel::Instance();
	outs << "------------------------------------------------------------------------" << endl;
	outs << "List of loaded BlueSky types {" << endl;
	kernel::plugins_enum plugins = k.loaded_plugins();
	kernel::types_enum tp;
	for(const auto& plug : plugins) {
		outs << "Plugin: [" << plug->name << "] [" << plug->description << "] [version "
			<< plug->version << "] {" << endl;
		const auto& types = k.plugin_types(*plug);
		for(const auto& t : types) {
			outs << "	[" << t.td().name << "] -> " << t.td().description << endl;
		}
		outs << "}" << endl;
	}

	outs << "} end of BlueSky types list" << endl;
	outs << "------------------------------------------------------------------------" << endl;
	return outs.str();
}

	
}} /* namespace blue_sky::kernel_tools */

{'fraction_non_alphanumeric': 0.26802973977695166, 'fraction_numerical': 0.008921933085501859, 'mean_word_length': 2.2737226277372264, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 16, 'https://': 2, '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': '6930613', 'n_tokens_mistral': 826, 'n_tokens_neox': 779, 'n_words': 241}