语言检查 - Arch Linux 中文维基

跳转到内容

# 语言检查

来自 Arch Linux 中文维基
翻译状态：

- 本文（或部分内容）译自 Language checking，最近一次同步于 2022-12-13，若英文版本有所更改，则您可以帮助同步与翻译更改的内容。
- 您可以在 ArchWiki 的对应页面找到本文翻译的原始修订历史。
- 本文可能与英文原文存在出入。

本文介绍拼写检查和语法检查软件。

大部分的拼写检查都包含两部分：逻辑处理程序和字典，请同时安装。

## 拼写检查器

- GNU Aspell — 希望最终能取代 ispell包 的拼写检查工具，请参考 aspell(1) 和 info document.

  http://aspell.net/ || aspell包, dictionaries, dictionaries in AUR

- Hunspell — Spell checker and morphological analyzer library and program, see also hunspell(1).

  https://hunspell.github.io/ || hunspell包, dictionaries in the official repositories, dictionaries in AUR

- Nuspell — Spell checker library and program designed as a modern alternative to hunspell, see also nuspell(1).

  https://nuspell.github.io/ || nuspell包, supports hunspell dictionaries

- Ispell — Interactive spell-checking program for Unix, see also ispell(1).

  https://www.cs.hmc.edu/~geoff/ispell.html || ispell包

### Language-specific

- Hspell — Hebrew spell-checker

  http://www.ivrix.org.il/projects/spell-checker/ || hspell包

- Voikko — Finnish spelling and grammar checker, hyphenator and collection of related linguistic data

  https://voikko.sourceforge.net || libvoikko包

### Enchant

Enchant is a wrapper library for generic spell checking, developed as part of AbiWord, supporting all above spell checkers apart from Ispell.

Enchant is available as the enchant包 package. It is also provided by the enchant-pureAUR package with minimal dependencies. For its usage and ordering file, see enchant-2(1).

Enchant is used by many applications through the following GTK libraries:

- gspell — Flexible API to implement spell checking in GTK applications.

  https://wiki.gnome.org/Projects/gspell || gspell包

- GtkSpell — Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget.

  http://gtkspell.sourceforge.net/ || gtkspell包, gtkspell3包

#### 拼写检查说所有文本都是错误的

如果安装字典也没用，可能是`enchant`出问题了。查看aspell识别到的词典文件：

    $ aspell dicts

    en
    en_GB
    ...etc

如果你需要的语言不在其中，添加下面的内容到`/usr/share/enchant/enchant.ordering`：

    en_GB:aspell # 以en_GB为例

### Applications

Firefox, Thunderbird, Chromium and LibreOffice can all use system-wide installed Hunspell dictionaries as well as dictionaries/other spell checkers installed through their own extension systems. See the following sections:

- Firefox#Spell checking
- Thunderbird#Spell checking
- LibreOffice#Spell checking

AbiWord and Gedit use Enchant.

## 语法检查器

- LanguageTool — Open source language checker, written in Java.

  https://www.languagetool.org || languagetool包

- Style and Diction — Diction identifies wordy and commonly misused phrases. Style analyses surface characteristics of a document.

  https://www.gnu.org/software/diction/ || dictionAUR

- TeXtidote — Language checker for LaTeX documents, relies on LanguageTool.

  https://sylvainhalle.github.io/textidote/ || textidote-binAUR

### Applications

Firefox, Thunderbird, Chromium and LibreOffice all support grammar checking only through extensions. For LibreOffice, see LibreOffice#Grammar checking.

AbiWord has a built-in grammar checker, see AbiWord#Grammar checking.

分类：​

- 词典

语言检查
添加话题