#pragma once
#include "config.h"
#if USE_NLP
#include
#include
#include
#include
namespace DB
{
class ILemmatizer
{
public:
using TokenPtr = std::shared_ptr;
virtual TokenPtr lemmatize(const char * token) = 0;
virtual ~ILemmatizer() = default;
};
class Lemmatizers
{
public:
using LemmPtr = std::shared_ptr;
private:
std::mutex mutex;
std::unordered_map lemmatizers;
std::unordered_map paths;
public:
explicit Lemmatizers(const Poco::Util::AbstractConfiguration & config);
LemmPtr getLemmatizer(const String & name);
};
}
#endif