LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
LangDetectorCore.h
Go to the documentation of this file.
1//
2// Created by tderouet on 24/05/22.
3//
4
5#ifndef LIMA_LANGDETECTORCORE_H
6#define LIMA_LANGDETECTORCORE_H
7
9
10#include <iostream>
11#include <sstream>
12#include "fasttext.h"
13
15{
16
17class LangDetectorCorePrivate;
18
20{
21public:
23 virtual ~LangDetectorCore();
24
25 void loadModel(const std::string& modelPath);
26
27 [[nodiscard]] std::string detectLang(const std::string& text) const;
28 /*Used to convert a language label "__label__lang" to a printable format "lang".*/
29 [[nodiscard]] static std::string labelToPrintable(const std::string& label) ;
30private:
32
33};
34
35
36} // namespace
37
38
39#endif //LIMA_LANGDETECTORCORE_H
#define LIMA_LANGDETECTOR_EXPORT