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
| /**
| * Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
| * MIT License (https://opensource.org/licenses/MIT)
| */
| #ifndef SEG_DICT_H
| #define SEG_DICT_H
|
| #include <stdint.h>
| #include <string>
| #include <vector>
| #include <map>
| using namespace std;
|
| namespace funasr {
| class SegDict {
| private:
| std::map<string, std::vector<string>> seg_dict;
|
| public:
| SegDict(const char *filename);
| ~SegDict();
| std::vector<std::string> GetTokensByWord(const std::string &word);
| };
|
| } // namespace funasr
| #endif
|
|