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

📄 dict.h

📁 基于python的中文分词程序
💻 H
字号:
#ifndef _DICT_H_#define _DICT_H_#include "word.h"/** * A dictionary is a hash table of *  - key: string *  - value: word * * Dictionary data can be loaded from files. Two type of dictionary * files are supported: *  - character file: Each line contains a number and a character, *                    the number is the frequency of the character. *                    The frequency should NOT exceeds 65535. *  - word file:      Each line contains a number and a word, the *                    number is the character count of the word. */namespace rmmseg{    /* Instead of making a class with only one instance, i'll not     * bother to make it a class here. */    namespace dict    {        void  add(Word *word);        bool  load_chars(const char *filename);        bool  load_words(const char *filename);        Word *get(const char *str, int len);    }}#endif /* _DICT_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -