<commit_before>#include <iostream>
#include <thread>

#include "plugins/lirch_plugin.h"
#include "plugins/edict_messages.h"


using namespace std;

void send_input(plugin_pipe p)
{
	string line;
	while (getline(cin, line))
	{
		//I can't use the regular constructor since that assumes the
		//locale is ASCII
		QString q=QString::fromLocal8Bit(line.c_str());
		p.write(raw_edict_message::create(q,"default"));
	}
}

void run(plugin_pipe p, string name)
{
	thread t(send_input, p);
	p.write(registration_message::create(-32000, name, "display"));
	p.write(registration_message::create(-32000, name, "me_display"));<commit_msg>The program now quits on EOF<commit_after>#include <iostream>
#include <thread>

#include "plugins/lirch_plugin.h"
#include "plugins/edict_messages.h"
#include "core/core_messages.h"

using namespace std;

void send_input(plugin_pipe p)
{
	string line;
	while (getline(cin, line))
	{
		//I can't use the regular constructor since that assumes the
		//locale is ASCII
		QString q=QString::fromLocal8Bit(line.c_str());
		p.write(raw_edict_message::create(q,"default"));
	}
	p.write(core_quit_message::create());
}

void run(plugin_pipe p, string name)
{
	thread t(send_input, p);
	p.write(registration_message::create(-32000, name, "display"));
	p.write(registration_message::create(-32000, name, "me_display"));
{'fraction_non_alphanumeric': 0.14606741573033707, 'fraction_numerical': 0.01647940074906367, 'mean_word_length': 6.182795698924731, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1158027', 'n_tokens_mistral': 504, 'n_tokens_neox': 471, 'n_words': 105}