dict.h
来自「Chinese segmentation in C」· C头文件 代码 · 共 39 行
H
39 行
#ifndef _DICT_H_040401_
#define _DICT_H_040401_
#include <iostream>
#include <fstream>
#include <string>
#include <map>
using namespace std;
const string DICTFILENAME("words.dict");
/*
typedef struct{
int id;
string word;
int freq;
} DictEntry;
*/
class CDict
{
public:
CDict();
~CDict();
bool GetFreq(string&) const {return false;};
bool IsWord(string&) const;
void AddFreq(string&) {};
private:
map<string, int> mapDict;
void OpenDict();
};
#endif /* _DICT_H_040401_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?