Hunspell:任何确凿的例子
Hunspell: Any solid example?
我已经下载并编译了hunspell fine。现在我想在wxWidgets上做一个测试应用程序,我开始寻找例子或教程。到目前为止我还没有找到。我可以找到"示例"可执行文件,但没有代码(可能隐藏在某个地方没有发现?)。在整个互联网三天,我什么也没找到。我找到的最好的是这个,但却是用我听不懂的语言写的。
我将欣赏任何简单的例子,指向教程的指针或任何有价值的东西。非常感谢!如果有人仍然需要一个可靠的例子,至少在ubuntu上libhunspell-dev
包在/usr/share/doc/libhunspell-dev/examples/example.cxx
中提供了一个。
这个文件也可以在网上找到,例如:https://www.apt-browse.org/browse/ubuntu/precise/main/i386/libmythes-dev/2:1.2.2-1/file/usr/share/doc/libmythes-dev/examples/example.cxx
基于此,我创建了一个非常小的c++示例:#include <iostream>
#include <string>
#include <hunspell/hunspell.hxx>
int main()
{
Hunspell spell ("/usr/share/hunspell/en_US.aff", "/usr/share/hunspell/en_US.dic");
std::cout << "Please enter one word:" << std::endl;
std::string word;
std::cin >> word;
if (spell.spell(word.c_str()) == 0) {
std::cout << "Spelling Error!";
} else {
std::cout << "Correct Spelling!";
}
return 0;
}
您看过这个网站吗?
http://sourceforge.net/projects/hunspell/files%2FHunspell%2FDocumentation/它本身不提供代码,但是您可以从那里下载完整的信息。HunSpell的网页说,它是基于MySpell,也许任何源代码在那里为MySpell是兼容的HunSpell。
相关文章:
- 如果C++类在类方法中具有动态分配,但没有构造函数/析构函数或任何非静态成员,那么它仍然是POD类型吗
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 如何在不产生任何垃圾的情况下获得C中的像素
- 为什么我不能在 C++ 中的特定函数重载中调用同一函数的任何其他重载?
- C++映射有2个键,这样任何1个键都可以用来获取值
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头
- RtlCaptureStackBackTrace未捕获任何帧
- 链表c++插入,所有情况都已检查,但没有任何工作
- C++模板函数,用于比较任何无符号整数和有符号整数
- Arduino millis() - millis() 怎么能等于 0 以外的任何东西?
- 尝试摆脱任何堆内存分配
- 是否有任何C++功能可以对地图进行排序?
- 打印时有二叉树问题.用户输入不打印任何内容
- 共享指针和具有自定义删除程序的唯一指针之间的语法差异背后的任何原因
- 在C++行尾写一个分号或多个分号是否会改变任何内容
- C++类型特征,以查看是否可以<uint32_t>对类型"K"的任何变量调用"static_cast(k)"
- C++ 将 CIN 值存储到任何类型的数组中
- 为什么瓦尔格林德在不释放恶意内存后没有报告任何问题?
- GStreamer在开始任何播放之前进行搜索
- Hunspell:任何确凿的例子