Hunspell API C++
2012-09-19 11:15
323 查看
Hunspell 是一个拼写检查器,OpenOffice 和 Firefox 以及 Thunderbird 默认的都是使用这个拼写检查器。
#include <hunspell/hunspell.hxx> /* or */
#include <hunspell/hunspell.h>
//初始化函数
Hunspell(const char *affpath,const char *dpath);
Hunspell(const char *affpath,const char *dpath,const char *key);
~Hunspell();
//添加额外的字典
int add_dic(const char *dpath);
int add_dic(const char *dpath,const char *key);
//判断字是否拼写错误
int spell(const char *word);
int spell(const char *word,int *info,char **root);
//对错误的词返回修改建议与返回修改单词的个数
int suggest(char***slst,const char *word);
//分析所使用的规则
int analyze(char***slst,const char *word);
//抽取词干
int stem(char***slst,const char *word);
int stem(char***slst,char **morph,intn);
//生成形态分析
int generate(char***slst,const char *word,const char *word2);
int generate(char***slst,const char *word,char **desc,intn);
//清空返回的建议列表
void free_list(char ***slst,intn);
//向个人字典添加单词
int add(const char *word);
//向个人字典添加单词 带词缀
int add_with_affix(const char *word,const char *example);
//删除个人词典中的单词
int remove(const char *word);
//返回ISO8859-1或者是在affix文件中用关键字SET定义的字符编码
char * get_dic_encoding();
//返回在字缀文件中用关键字WORDCHARS定义的用于词语切分的额外字符
const char * get_wordchars();
//返回在字缀文件中用关键字WORDCHARS定义的用于词语切分的额外字符
unsigned short * get_wordchars_utf16(int *len);
//返回8字符的字典编码情况表
struct cs_info*get_csconv();
//返回版本号
const char * get_version();
#include <hunspell/hunspell.hxx> /* or */
#include <hunspell/hunspell.h>
//初始化函数
Hunspell(const char *affpath,const char *dpath);
Hunspell(const char *affpath,const char *dpath,const char *key);
~Hunspell();
//添加额外的字典
int add_dic(const char *dpath);
int add_dic(const char *dpath,const char *key);
//判断字是否拼写错误
int spell(const char *word);
int spell(const char *word,int *info,char **root);
//对错误的词返回修改建议与返回修改单词的个数
int suggest(char***slst,const char *word);
//分析所使用的规则
int analyze(char***slst,const char *word);
//抽取词干
int stem(char***slst,const char *word);
int stem(char***slst,char **morph,intn);
//生成形态分析
int generate(char***slst,const char *word,const char *word2);
int generate(char***slst,const char *word,char **desc,intn);
//清空返回的建议列表
void free_list(char ***slst,intn);
//向个人字典添加单词
int add(const char *word);
//向个人字典添加单词 带词缀
int add_with_affix(const char *word,const char *example);
//删除个人词典中的单词
int remove(const char *word);
//返回ISO8859-1或者是在affix文件中用关键字SET定义的字符编码
char * get_dic_encoding();
//返回在字缀文件中用关键字WORDCHARS定义的用于词语切分的额外字符
const char * get_wordchars();
//返回在字缀文件中用关键字WORDCHARS定义的用于词语切分的额外字符
unsigned short * get_wordchars_utf16(int *len);
//返回8字符的字典编码情况表
struct cs_info*get_csconv();
//返回版本号
const char * get_version();
相关文章推荐
- C++ 通过WIN32 API 获取逻辑磁盘详细信息
- GDAL学习笔记——OGRLayer C++ API
- Cuda C++ Thrust API与 Cuda Runtime API程序比较
- 【COCOS2DX-LUA 脚本开发之十一】C/C++与Lua之间进行数据函数交互以及解决“PANIC: unprotected error in call to Lua API (转)
- Using OpenAPI with C++[3]
- 循序渐进PostgreSQL: 学习pqxx C++ API访问
- 跪求C++获取显卡位宽、3D-API、cpu缓存的方法!!!
- Using OpenAPI with C++[3] _VC调用WebService
- C/C++中调用api设置mysql连接的编码方式
- Sqlite c/c++ api 学习
- 使命!!用C++和win32 API写面向对象的windows程序吧!!!~~
- C++数据类型与C#对应关系 c#调用WINDWOS API时,非常有用(转)
- Borland Delphi/C++Builder ToolsAPI
- c++添加开机启动项,win32 api操作注册表,读写注册表
- 如何导出 C和C++ 的API 给 Lua 使用
- C/C++中调用api设置mysql连接的编码方式
- [转]tesseract api C++使用例子
- Caffe C++API 提取任意一张图片的特征系列二----MemoryData
- 【CUDA开发】Cuda C++ Thrust API与 Cuda Runtime API程序比较
- C++ API访问Berkeley DB XML数据库问题