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
8
#include "
LangDetectorExport.h
"
9
10
#include <iostream>
11
#include <sstream>
12
#include "fasttext.h"
13
14
namespace
Lima::LinguisticProcessing::LDetector
15
{
16
17
class
LangDetectorCorePrivate;
18
19
class
LIMA_LANGDETECTOR_EXPORT
LangDetectorCore
20
{
21
public
:
22
LangDetectorCore
();
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) ;
30
private
:
31
LangDetectorCorePrivate
* m_d;
32
33
};
34
35
36
}
// namespace
37
38
39
#endif
//LIMA_LANGDETECTORCORE_H
LangDetectorExport.h
LIMA_LANGDETECTOR_EXPORT
#define LIMA_LANGDETECTOR_EXPORT
Definition
LangDetectorExport.h:27
Lima::LinguisticProcessing::LDetector::LangDetectorCorePrivate
Definition
LangDetectorCore.cpp:8
Lima::LinguisticProcessing::LDetector::LangDetectorCore
Definition
LangDetectorCore.h:20
Lima::LinguisticProcessing::LDetector
Definition
LangDetector.cpp:16
lima_linguisticprocessing
src
linguisticProcessing
core
LangDetector
LangDetectorCore.h
Generated by
1.9.8