'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 2007, 2011, Oracle and/or its affiliates.All rights reserved. .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation.Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation.In the following statement, the phrase"this text" refers to portions of the system documentation.Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard,the original IEEE and The Open Group Standard is the referee document.The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.This notice shall appear on any product containing this material. .TH spell 1 "2011 年 2 月 11 日" "SunOS 5.11" "用户命令" .SH 名称 spell, hashmake, spellin, hashcheck \- 报告拼写错误 .SH 用法概要 .LP .nf \fBspell\fR [\fB-bilvx\fR] [+ \fIlocal_file\fR] [\fIfile\fR] ... .fi .LP .nf \fB/usr/lib/spell/hashmake\fR .fi .LP .nf \fB/usr/lib/spell/spellin\fR \fIn\fR .fi .LP .nf \fB/usr/lib/spell/hashcheck\fR \fIspelling_list\fR .fi .SH 描述 .sp .LP \fBspell\fR 会从指定的 \fBfile\fR 收集词语并在拼写列表中查找它们。如果词语不在拼写列表中,也无法由拼写列表中的词语衍生(通过使用某些变形、前缀或后缀),那么会将这些词语写入标准输出。 .sp .LP 如果没有 \fBfile\fR 参数,则会从标准输入中收集要检查的词语。\fBspell\fR 会忽略大部分 \fBtroff\fR(1)、\fBtbl\fR(1) 和 \fBeqn\fR(1) 构造。所有输出词语的副本都会累积在历史文件 (\fBspellhist\fR) 中,且 \fBstop\fR 列表会过滤掉本来会通过的拼写错误(例如 \fBtheir=thy-y+ier\fR)。 .sp .LP 缺省情况下,\fBspell\fR(如 \fBderoff\fR(1))遵循包含文件(\fB\&.so\fR 和 \fB\&.nx\fR \fBtroff\fR(1) 请求)的链,除非此类包含文件的名称以 \fB/usr/lib\fR 开头。 .sp .LP 标准拼写列表基于多个源,尽管它不如普通的字典严谨,但也可以更有效地纠正名称和流行的技术词语。它可轻松包含生物学、医学和化学等领域的专业词汇。 .sp .LP 三个程序可帮忙维护和检查 \fBspell\fR 所使用的散列列表: .sp .ne 2 .mk .na \fB\fBhashmake\fR\fR .ad .RS 13n .rt 从标准输入中读取一组词语,并将对应的九位数散列代码写入标准输出。 .RE .sp .ne 2 .mk .na \fB\fBspellin\fR\fR .ad .RS 13n .rt 从标准输入中读取 \fIn\fR 散列代码,并将压缩的拼写列表写入标准输出。 .RE .sp .ne 2 .mk .na \fB\fBhashcheck\fR\fR .ad .RS 13n .rt 读取压缩的 \fIspelling_list\fR 并为其中的所有词语重新创建九位数散列代码。它会将这些代码写入标准输出。 .RE .SH 选项 .sp .LP 支持以下选项: .sp .ne 2 .mk .na \fB\fB-b\fR\fR .ad .RS 15n .rt 检查英式拼写。除首选 \fBcentre\fR(中间)、\fBcolour\fR(颜色)、\fBprogramme\fR(程序)、\fBspeciality\fR(特点)、\fBtravelled\fR(旅行)等单词外,该选项也坚持使用类似 \fBstandardise\fR(标准化)的词语中的 \fI-ise\fR。 .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .RS 15n .rt 使 \fBderoff\fR(1) 忽略 \fB\&.so\fR 和 \fB\&.nx\fR 命令。如果系统中不存在 \fBderoff\fR(1),那么会忽略此选项。 .RE .sp .ne 2 .mk .na \fB\fB-l\fR\fR .ad .RS 15n .rt 遵循 \fIall\fR 包含文件的链。 .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 15n .rt 列显字面上不在拼写列表上的所有词语以及根据拼写列表词语派生的看似合理词语。 .RE .sp .ne 2 .mk .na \fB\fB-x\fR\fR .ad .RS 15n .rt 列显每个看似合理的词干,每行一个,并在每个词语前加上 \fB=\fR。 .RE .sp .ne 2 .mk .na \fB\fB+\fR\fIlocal_file\fR\fR .ad .RS 15n .rt 为每个作业指定一组正确拼写的词语(除了 \fBspell\fR 自己的拼写列表之外)。\fIlocal_file \fR 是包含词语排序列表的用户提供文件的名称,每行一个。在 \fIlocal_file\fR 中找到的词语将被从 \fBspell\fR 的输出中删除。使用 \fBsort\fR(1) 以根据 ASCII 整理序列对 \fIlocal_file\fR 进行排序。如果没有遵循此顺序,则可能忽略 \fIlocal_file\fR 中的某些条目。 .RE .SH 操作数 .sp .LP 支持下列操作数: .sp .ne 2 .mk .na \fB\fBfile\fR\fR .ad .RS 8n .rt 用以检查拼写错误的文本文件的路径名。如果没有命名任何文件,则会从标准输入中收集词语。 .RE .SH 环境变量 .sp .LP 有关影响 \fBspell\fR 执行的以下环境变量的说明,请参见 \fBenviron\fR(5):\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR 和 \fBNLSPATH\fR。 .SH 退出状态 .sp .LP 将返回以下退出值: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 成功完成。 .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt 出现错误。 .RE .SH 文件 .sp .ne 2 .mk .na \fB\fBD_SPELL=/usr/lib/spell/hlist[ab]\fR\fR .ad .sp .6 .RS 4n 散列的拼写列表,美式和英式 .RE .sp .ne 2 .mk .na \fB\fBS_SPELL=/usr/lib/spell/hstop\fR\fR .ad .sp .6 .RS 4n 散列的非索引字表 .RE .sp .ne 2 .mk .na \fB\fBH_SPELL=$HOME/.spellhist\fR\fR .ad .sp .6 .RS 4n 历史文件 .RE .sp .ne 2 .mk .na \fB\fB/usr/share/lib/dict/words\fR\fR .ad .sp .6 .RS 4n 主字典 .RE .SH 属性 .sp .LP 有关下列属性的说明,请参见 \fBattributes\fR(5): .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性文本/拼写实用程序 .TE .SH 另请参见 .sp .LP \fBderoff\fR(1)、\fBeqn\fR(1)、\fBsort\fR(1)、\fBtbl\fR(1)、\fBtroff\fR(1)、\fBattributes\fR(5)、\fBenviron\fR(5) .SH 附注 .sp .LP \fBspell\fR 仅支持在美国 \fBASCII\fR 代码集中定义的英语单词。 .SH 已知问题 .sp .LP 拼写列表的覆盖范围不太均匀。新安装可能需要监视输出若干个月以收集本地添加项。 .sp .LP 英式拼写是由美国人来完成的。 .sp .LP 缺省情况下可监视到拼写错误的单词。要实现此功能,请将 \fBH_SPELL \fR 环境变量设置为可写入拼写进程的文件的名称。如果未设置 \fBH_SPELL\fR,则将使用 \fB$HOME/.spellhist\fR 作为历史文件。如果不需要监视,则可以创建禁用写入权限的相应拼写历史文件。