📄 dict.h
字号:
#ifndef _DICT_H
#define _DICT_H
#include <stdio.h>
#include <fstream>
#include <string>
#include <map>
#include "lexicon.h"
#define DICTFILENAME "dict.bin"
using namespace std;
class Dict
{
public:
Dict();
~Dict();
//bool GetFreq(string&) const {}//access freq
bool IsWord(string&) const;
void AddFreq(string&);
int get_id(string&);
private:
//map<string, int> dictMap;
map<string, int> dictMap;
//pair first int:id, second int:freq
void OpenDict();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -