#include <iostream>
#include <string>

#include "boost/asio.hpp"
#include "http/server.hpp"

#include "noun.h"

#include "adjective.h"
#include "verb.h"
#include "other.h"
#include "preposition.h"

int main()
{
	NN::SetupDeclentionMap();
	NN::LoadNounDeclencionCaseTable();
	NN::LoadFrequentWordSet();
	NN::FillDivisionCaseMaps();
	NN::CalculatePluralForm();

	AJ::LoadAdjectiveDeclencionCaseTable();
	AJ::LoadFrequentAdjectiveSet();
	AJ::FillDivisionCaseMaps();
	AJ::SetupDeclentionMap();

	VB::LoadVerbConjunctionTable();
	VB::LoadFrequentWordSet();

	OT::LoadWordSet("frequent_other_2000.txt");
	OT::LoadWordSet("pronouns.txt");
	OT::LoadWordSet("numerals.txt");

	PP::LoadWordSet("preposition.txt");
	
	try
	{

		// Initialise the server.
		http::server::server s("0.0.0.0", "8843");

		// Run the server until stopped.
		s.run();
	}
	catch (std::exception& e)
	{
		std::cerr << "exception: " << e.what() << "\n";
	}

	/*
	std::wstring s(L"уродам");

	std::vector<NounStruct> recognizedResultArr = RecognizeNoun(s);

	for (auto& i : recognizedResultArr)
	{
		std::wcout << i.noun << L"\n";
	}*/



	system("pause");

	return 0;
}