⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dict.h

📁 本系统实现了分词和倒排索引
💻 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 + -