You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
433 B
24 lines
433 B
#ifndef VOCAB_H
|
|
#define VOCAB_H
|
|
|
|
#include <stdint.h>
|
|
#include <string>
|
|
#include <vector>
|
|
using namespace std;
|
|
|
|
class Vocab {
|
|
private:
|
|
vector<string> vocab;
|
|
bool isChinese(string ch);
|
|
bool isEnglish(string ch);
|
|
|
|
public:
|
|
Vocab(const char *filename);
|
|
~Vocab();
|
|
int size();
|
|
string vector2string(vector<int> in);
|
|
string vector2stringV2(vector<int> in);
|
|
string vector2stringV2(string in);
|
|
};
|
|
|
|
#endif |