#pragma once

#include <util/digest/fnv.h>

#include <dict/word2vec/model/model.h>
#include <dict/word2vec/util/analogy/bruteforce/searcher.h>

#include <library/cpp/containers/comptrie/comptrie.h>
#include <library/cpp/containers/comptrie/prefix_iterator.h>

#include <mapreduce/yt/interface/client.h>

#include "batch_matcher.h"
#include "config.h"

namespace NWebmaster {
namespace NRecommended {

constexpr const char *F_REL1    = "Rel1";

/*
struct TReduceExtractTextsFromJupiter: public NYT::IReducer<NYT::TTableReader<NYT::TNode>, NYT::TTableWriter<NYT::TNode>> {
    //reduce by Host, Path
    void Do(TReader *input, TWriter *output) override;
};
*/

/*
struct TReduceEnrichQueries : public NYT::IReducer<NYT::TTableReader<NYT::TNode>, NYT::TTableWriter<NYT::TNode>> {
    //ReduceBy Url
    void Do(TReader *input, TWriter *output) override;
};
*/

struct TJoinSourceQueriesReducer : public NYT::IReducer<NYT::TTableReader<NYT::TNode>, NYT::TTableWriter<NYT::TNode>> {
    //reduce by Query, Host, RegionId, Position
    void Do(TReader *input, TWriter *output) override;
};

/*
struct TMapFilterNonGroups : public NYT::IMapper<NYT::TTableReader<NYT::TNode>, NYT::TTableWriter<NYT::TNode>> {
    void Do(TReader *input, TWriter *output) override;
};
*/

//int TaskBuildTexts(const TConfig &config);
void TaskForecaster(const TConfig &config);

void TaskForecasterDev(const TConfig &config);

} //namespace NRecommended
} //namespace NWebmaster
