曲径通幽论坛

标题: aspell-----------检查单词拼写 [打印本页]

作者: beyes    时间: 2008-11-24 14:33
标题: aspell-----------检查单词拼写
如在一个纯文本里,内容为:
The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

故意改几个单词为错误的来做测试,如下:

library           改为            lirary
systems      改为            ystems
access        改为            acccess

然后使用命令:

aspell check file

那么命令执行后会找出这几个拼写错误的单词。

注意,如果系统安装默认语言不是英文的话,可能是无法找到的。比如我在中文环境下,显示:
Error: No word lists can be found for the language "zh_CN".


拼写检查来自字典文件的对比,这个字典文件属性为:

lrwxrwxrwx 1 root root 19 09-14 01:34 /usr/share/dict/words -> /var/lib/dict/words

还可以到:

http://aspell.sourcefoge.net/

下载得到最新的辞典文件。




欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2