How to use Hspell with...

On this page you can find instructions on how to configure various editors to use Hspell. This page gets updated regularly, so check it out often.

Revision History:
16-Jul-2004 Added OpenOffice, Mac, AbiWord, Mozilla instructions; Updated Emacs section.

Contents

1. LyX
2. KDE
     2.1 Issues with older KDE versions
     2.2 Spell-checking Hebrew and English simultaneously in KDE
3. OpenOffice
4. Mac OS X
5. AbiWord
6. Mozilla
7. Vim
8. GNU Emacs
9. Geresh
10. Known problems
11. Not supported (yet)

1. LyX

If you're using a recent version of LyX which was compiled with the Qt frontend, just choose "hspell" in the speller configuration dialog.

If you're using an older version, or if you wish to simultaneously spell-check Hebrew and English, add the following to ~/.lyx/preferences (or to ~/.lyx/lyxrc):

\spell_command hspell
## If you wish to spell-check English words as well,
## use the following command instead:
#\spell_command hspell-i

## If LyX was compiled with pspell support,
## uncomment the following.
#\use_pspell false

For Hebrew LyX general instructions, check out Dekel's web-site.

Known problems with LyX

LyX breaks up words on quote characters (gershayim) before passing them to Hspell. This means that spell-checking in LyX will not understand rashei tevot (acronyms) and gimatria correctly.

2. KDE

Thanks to Meni Livne for contributing this section.

KDE supports Hebrew spell checking using Hspell in KDE 3.1.2 and any later version. It allows spell checking Hebrew text in every KDE application that has spell-checking features (see note about KOffice below). To use it, choose "HSpell" in the Spell Checking Configuration dialog accessible via KControl or through the Configuration dialog of your favorite KDE application that has spell-checking features.

If you are using a version of KDE prior to KDE 3.1.2 and still want to have Hebrew spell checking in your KDE applications without upgrading, see instructions in section 2.1 below.

Note about KOffice: Since KOffice applications use their own spell-checking library and not the kspell library from kdelibs like all other KDE applications, using a KDE version that supports Hspell with versions of KOffice prior to KOffice 1.3 will not suffice. If you want to have Hebrew spell checking in KOffice applications, upgrade to KOffice 1.3 or later. Configuration of spell checking in KOffice applications is the same as the rest of KDE.

2.1 Issues with older KDE versions

KDE 3.1.2 and 3.1.3:

Hspell v0.9 and up (not yet released) can handle words with niqqud (it simply ignores them). KDE versions prior to KDE 3.1.4 could communicate with hspell only in the ISO-8859-8 encoding, which cannot represent niqqud (KDE substitutes "?" for any niqqud character, thus erroneously making hspell see several words instead of one niqquded word). One solution is to upgrade your KDE to a version later than 3.1.3. Another solution that does not involve upgrading is to follow the instructions about KDE < 3.1.2 below on how to patch your kspell library to recognize the CP1255 encoding, which can represent niqqud. Of course, if you're not using niqqud in your documents, or if you don't mind some harmless fikshushim when spell-checking seldom used niqquded words, you can ignore this problem.

KDE < 3.1.2:

Versions of KDE prior to 3.1.2 did not support Hspell out-the-box. Nevertheless, it is still possible to have KDE use Hspell with these versions. There were basically two problems with these versions that prevented you from using Hspell:

  1. They did not let you choose "hspell" as your speller program.

    To circumvent this deficiency, symlink "ispell", or "aspell", to "hspell". Then, in the Spell Checking Configuration dialog, choose the appropriate "client" program.

  2. The "ISO-8859-8" encoding (in the Spell Checking Configuration dialog) was considered visual Hebrew, so Hspell would have been getting reversed Hebrew.

    To solve this problem, patch the kspell library (kspell is KDE's speller module) to recognize CP1255 through the following steps:

2.2 Spell-checking Hebrew and English simultaneously in KDE

The usual way you'd spell-check multilingual texts in KDE is to first spell-check one language, then reconfigure KDE for the other language and spell-check that other language.

However, using the "multispell" utility provided with the Hspell distribution you can spell-check Hebrew and English simultaneously, even without having to reconfigure KDE's spell checking settings.

Since "multispell" is not in KDE's Spell Checking Configuration dialog, you'll have to resort to symlink tricks.

3. OpenOffice

The Hebrew version of OpenOffice, available from openoffice.org.il, has Hebrew spell-checking support that works out-of-the-box. This is true for both the MS-Windows and the Linux binaries. See the Mac OS X section for info on OOo for the Mac.

However, if you're using a non-Hebrew version of OpenOffice, you have to install the Hspell module separately (this is the same module that is built-in to the Hebrew version). This module already includes Hspell itself together with its dictionary.

The Hspell module can be installed using an RPM, a binary tarball, or a source tarball.

After successfully installing the module, a new item, "Hspell Hebrew Spell Checker", will be added to the "Available language modules" list in the Tools/Options/Language-Settings/Writing-Aids dialog.

To be able to spell-check Hebrew, it's necessary to comply with the following configuration (all in the Tools/Options/Language-Settings/Languages dialog):

  1. "Complex text layout (CTL) support" must be enabled.
  2. The CTL language (under "Default languages for documents") must be Hebrew.

Known Problems with OpenOffice

[[TODO]]

4. Mac OS X

Powered by Hspell, the Hebrew Spelling Service, by Mitz Pettel, adds a Hebrew spelling dictionary to Mac OS X's built-in spell checker.

Once the Hebrew Spelling Service is installed, the Hebrew spelling dictionary can be selected and used in any application that has a standard Spelling submenu in its Edit menu, such as TextEdit, Mail or Mellel.

Note that OpenOffice will not benefit from the Hebrew Spelling Service because it does not use the standard spelling interface of the Mac. For a build of OpenOffice for Mac OS X that does Hebrew spell checking, please contact Yeda.

5. AbiWord

AbiWord, thanks to work done by Yaacov Zamir, now supports Hspell (on Unix-like platforms).

Please visit Yaacov's Hspell and AbiWord mini-howto page for more information.

6. Mozilla

The Hebrew dictionary of Hspell is now available for use with Mozilla. Right now it's at the BETA stage. It is available at:

        http://ivrix.org.il/redhat/spell-he-IL.xpi

This package is suitable for any platform (MS-Windows included) because it doesn't contain binary code. You can install this package only as root/administrator.

Next time you run Mozilla and call up the spelling dialog box, you'll be able to select the Hebrew dictionary by choosing "he-IL" from the Language menu.

Known Problems with Mozilla

(BTW, if you're interested in spell-checking Hebrew in web-pages while you surf, which is completely unrelated to spell-checking Hebrew in Composer, you might be interested in Proxpeller.)

7. Vim

For Vim 6.x, use this script. It supports bilingual spell-checking and UTF-8 files. The documentation is commented within the file.

If you encounter problems using the script, please contact <mooffie @at@ typo.co.il>

8. GNU Emacs

The following instructions are known to work with GNU Emacs and with BiDi-Emacs. They are known not to work with XEmacs.

Add the following to your ~/.emacs:

;; Settings by Mooffie, with additions by Ehud Karni.

(setq-default ispell-program-name "hspell")
;; If you wish to spell-check English words as well,
;; uncomment the following:
;(setq-default ispell-program-name "multispell")

(require 'ispell)

;; Tell emacs what constitutes a word.
(add-to-list 'ispell-dictionary-alist
             '("hebrew8"
               "[a-zA-Z\340-\372]"
               "[^a-zA-Z\340-\372]"
               "['\"]" t ("-B") nil iso-8859-8))

(if (fboundp 'define-key-after)
    (define-key-after ispell-menu-map [ispell-select-hebrew8]
      '("Select Hebrew8 Dict" . (lambda()
                                  (interactive)
                                  (ispell-change-dictionary "hebrew8")))
      'american))

;; If you wish to have the Hebrew dictionary selected automatically
;; for each buffer, uncomment:
;(ispell-change-dictionary "hebrew8")       ;; set hebrew dictionary
;(setq ispell-dictionary "hebrew8")         ;; set it explicitly

;; When flyspell is applied to large regions, the speller is not used
;; in "-a" mode and thus we would not be able to use multispell. The
;; default for "large regions" is 1000 bytes, so we bump it to 30000.
(setq flyspell-large-region 30000)

;; for use of hebrew menus (and flyspell menues) add to your .Xdefaults:
;; emacs.menu.popup.font: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-8

A sample Emacs session

  1. Launch emacs in the he_IL (ISO-8859-8) locale.
  2. Type some Hebrew into the buffer.
  3. Select the "hebrew8" dictionary: Tools | Spell Checking | Select Hebrew8 Dict. (You must repeat that for every buffer you want to spell-check.)
  4. Spell-check the document: Tools | Spell Checking | Spell-Check Buffer.

Known problems with Emacs

Spell-checking UTF-8 files will fail. It seems that there's a bug in "ispell.el". Stay tuned.

9. Geresh

Geresh, starting with version 0.4.0, supports ispell-like spellers, including Hspell.

Add the following to your ~/.geresh/gereshrc:

--speller-cmd="hspell -a"
--speller-encoding=iso-8859-8

## If you wish to spell-check English words as well,
## uncomment the following:
#--speller-cmd="multispell -a"

## If you wish to see hspell's spelling-hints,
## uncomment the following (but this feature is
## unavailable in hspell 0.6):
#--speller-cmd="multispell -a -n"

10. Known problems

11. Not supported (yet)

The following applications do not support Hspell. Usually that's because they don't support ispell's pipe mode but instead use some other API (like pspell).


This page is maintained by Mooffie. Please send additions and corrections to <mooffie @ typo.co.il>

The URL of this page is http://ivrix.org.il/projects/spell-checker/Hspell-HOWTO.html