2021-06-05 00:52:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <common/types.h>
|
|
|
|
#include <Poco/Util/Application.h>
|
|
|
|
|
|
|
|
#include <mutex>
|
|
|
|
#include <unordered_map>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class Lemmatizer;
|
|
|
|
|
2021-06-19 18:52:09 +00:00
|
|
|
class Lemmatizers
|
|
|
|
{
|
2021-06-05 00:52:35 +00:00
|
|
|
public:
|
|
|
|
using LemmPtr = std::shared_ptr<Lemmatizer>;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::mutex mutex;
|
|
|
|
std::unordered_map<String, LemmPtr> lemmatizers;
|
2021-06-19 18:52:09 +00:00
|
|
|
std::unordered_map<String, String> paths;
|
2021-06-05 00:52:35 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
Lemmatizers(const Poco::Util::AbstractConfiguration & config);
|
|
|
|
|
|
|
|
LemmPtr getLemmatizer(const String & name);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|