Minh’s Notes

Human-readable chicken scratch

Minh Nguyễn
June 5th, 2008
Mozilla Firefox
#1,221

Edit

Vietnamese Dictionary 1.0 for Firefox

Any serious computer user lives by Firefox extensions. My copy of Firefox has around 30 installed, and I wouldn’t part with more than five of them. It’s bad enough that I employ the Nightly Tester Tools extension to shove out-of-date extensions down Firefox’s figurative throat and Menu Editor to keep my sprawling Tools menu (the product of 30 extensions) tidy.

I know most of this blog’s readers don’t write in Vietnamese, but for the few who do, I spent a bit of last weekend writing an extension for Firefox and its companion e-mail program, Thunderbird, that checks your Vietnamese spelling as you type. Unlike the last piece of software I released, this one requires hardly any explanation. You know if you need it.

Features

The Vietnamese Dictionary extension provides two spell checking dictionaries: one prefers the newer-style diacritical marks typically used in Vietnam (e.g., xoá), and the other prefers the traditional placement of accent marks (xóa). Both dictionaries can suggest accented words when an unaccented word is entered, as long as the entered word is not recognized by the spell checker.

Installation

So if you’re a Vietnamese speaker and don’t have absolutely perfect typing skills, you can add Vietnamese spell checking to your Web browser by downloading this extension:

vi_dictionary_1.0.0.24.xpi
(XPInstall archive, 51.4 kB)

Clicking the link above will trigger a banner (typically yellow) indicating that Firefox has blocked the installation:

  • In Firefox 2, click Edit Options, and in the dialog box that appears, click Allow and Close. Click on the link again, and click Install Now in the dialog box that appears. Finally, restart Firefox. (By clicking Allow, you added notes.1ec5.org to your whitelist. To remove this site from the whitelist, go to the Security tag of the Options or Preferences window, and click the first Exceptions button. In the dialog box that appears, select notes.1ec5.org and click Remove Site.)
  • In Firefox 3, click Allow, then click Install Now in the dialog box that appears. Restart Firefox.

To install this extension in Thunderbird, right-click on the link above and select Save Link As. After saving the file to your computer, open Thunderbird, go to the Tools menu, and select Add-ons. Now find the file you downloaded and drag it into the Add-ons window. Finally, click Install Now and restart Thunderbird.

The extension installer is also available at the official Firefox Add-ons website (registration required for now) and Google Code GitHub (download only).

System requirements

The extension works in Firefox versions 2.0–3.0 and Thunderbird versions 2.0–3.0a1. Please note that the extension doesn’t provide great suggestions in Firefox 2, especially when the word is capitalized, but you can currently download a release candidate of Firefox 3 to see the spell checker in its full glory. (The final release of Firefox 3 is coming later this month.)

Your computer also needs a font capable of displaying the various Vietnamese characters. Most modern operating systems now come with Vietnamese font support.

Usage

After installing this extension in Firefox, right-click on any webpage textbox, make sure the “Check Spelling” option is enabled, and select either Vietnamese (New) or Vietnamese (Old) from the Languages submenu.

Suggestions for “xoá” in the Vietnamese Dictionary extension

In Thunderbird, open the Options or Preferences window (Tools ▸ Options… in Windows, or Thunderbird ▸ Preferences… on the Mac). Go to the Composition panel and the Spelling tab beneath it. From here, you can change the spell-checking language to vi-x-New or vi-x-Old. Changing the spell-checking language is considerably easier if you instead install the Dictionary Switcher extension for Thunderbird.

Known issues

In Firefox 2 and Thunderbird 2, the wordlist is case-sensitive, so any capitalized word is marked as a misspelling, and some words with misplaced diacritical marks are ignored.

License

This extension was based on a list of entries in the Free Vietnamese Dictionary Project by Hồ Ngọc Đức and a set of rules for generating suggestions in the Vietnamese spell checker for OpenOffice.org by Iván García. Both are licensed under the GNU General Public License. Because the GPL requires any derivative works to be released under the same license, the GPL applies to this extension as well.

In short, that means you’re allowed – actually, encouraged – to download, install, use, tinker with, and share this extension, as long as you don’t forbid others from doing the same.

Building it yourself

If you’d like to keep up with the latest development code, you can use the following command (which requires Subversion Git) in a command line window, to checkout the extension’s current source code:

svn co http://version.1ec5.org/vi_dictionary/trunk/
svn co http://hunspell-spellcheck-vi.googlecode.com/svn/trunk/ hunspell-spellcheck-vi
git clone https://github.com/1ec5/hunspell-vi.git

Iván and I have merged our projects, so I’ve updated the instructions to checkout from Google Code’s Subversion respository.

Iván and I have agreed to move the project to GitHub, where you can easily propose improvements to the dictionaries.

To package the code as an extension yourself, you can use the included build script, which requires Linux or Mac OS X. In a command line window, navigate to the hunspell-vi/firefox_thunderbird/ directory and execute the following commands:

chmod 755 build.sh
./build.sh

Two installable archives, vi_dictionary.xpi and vi_dictionary_version.xpi should now reside in that directory.

A humble request

I need feedback: you might’ve noticed that the extension is marked as “experimental” at the Firefox Add-ons site. Because Firefox has become so popular lately, Mozilla has implemented a stringent vetting process for new extensions such as mine. In order for the extension to appear “publicly” – that is, for it to be included in the extensions listing and installable without having to log in – I need to demonstrate to Mozilla that the extension is trustworthy.

That’s where you come in. After installing the Vietnamese Dictionary extension, please take a moment to publicly share your thoughts at its Firefox Add-ons entry. Once enough people install and comment on the extension at that page, I’ll be able to nominate it for review.

Finally, if you encounter any correctly spelled words that the extension wrongly marks as incorrect, please leave a comment at the Errata page report a new issue.

I hope this extension makes your day-to-day Web browsing a tad easier. Maybe it’ll even be one of your 25 can’t-live-without extensions.


Comments

  1. Dear Sir
    I am writing a book about my experiences in Vietnam and need to know the correct spelling for the "chieu?? Hoi"" program. This was called "open arms' in English. A program that offered amnesty for VC who would give up and come over to the goverment side. any help will be appreciated. Thanks Tony Markl

    1. Hi Tony. The program you’re referring to was called Chiêu Hồi, pronounced something like “chee-oh hoey”.

  2. Hi Minh!

    "Enables spell checking in Vietnamese with a wordlist based on Hồ Ngọc Đức’s Free Vietnamese Dictionary Project."

    Minh co the email cho Khoi biet URL de download cai wordlist cua Ho Ngoc Duc duoc khong? Khoi can cai list nay cho cai project Khoi dang lam. Thank you nha

    1. Hồ Ngọc Đức đã làm sẵn vài gói chứa toàn bộ nội dung của FVDP. Mỗi gói này đựng vài tập tin; thí dụ muốn danh sách từ trong từ điển Việt-Việt, thì phải tải xuống VietViet.zip, mở rộng nó, và mở tập tin VV/vv30K.index. (Khôi cần phải format lại tập tin này, vì nó cũng chứa dữ liệu từ loại v.v.)

      Các tập tin này là dữ liệu rút nguyên từ FVDP. Dùng danh sách này, tôi đã lọc ra các địa danh và những từ không chính xác. Kết quả có sẵn tại Google Code. Khôi thấy từ nào không chính xác hoặc đang thiếu thì xin báo cáo cho chúng tôi. Cám ơn.

  3. Hi Minh,

    I want to setup AVIM for MediaWiki and could not find out any document to show me how to do this.

    I really appreciate if you may give me the direction or any pointer to accomplish the aforementioned task.


    Thanks and regards,

    PDK

    PS. Please send the link to my email address. Thanks.

    1. We haven’t written an AVIM extension for MediaWiki, but here are relatively simple instructions for setting it up on your wiki. If you need an English translation, let me know.