-
-
Notifications
You must be signed in to change notification settings - Fork 691
Expand file tree
/
Copy pathLanguageIdentification.h
More file actions
31 lines (23 loc) · 773 Bytes
/
Copy pathLanguageIdentification.h
File metadata and controls
31 lines (23 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include "LanguageIdentification.g.h"
#include <ppl.h>
#include "lang_id/lang-id.h"
using namespace concurrency;
using namespace libtextclassifier3::mobile::lang_id;
namespace winrt::Telegram::Native::implementation
{
struct LanguageIdentification : LanguageIdentificationT<LanguageIdentification>
{
static hstring IdentifyLanguage(hstring text);
private:
static std::mutex s_criticalSection;
static std::unique_ptr<libtextclassifier3::mobile::lang_id::LangId> s_langid;
static LangId* Current();
};
}
namespace winrt::Telegram::Native::factory_implementation
{
struct LanguageIdentification : LanguageIdentificationT<LanguageIdentification, implementation::LanguageIdentification>
{
};
}