Hunspell for medical terms spell-checking

The Learning Technologies Team at MPOW was on the lookout for a spell-check dictionary for our LMS so when students and faculty misspell medical words, they’ll get suggestions for the correct spelling. One of the LMS is Blackboard and it supports Hunspell dictionaries.

I found https://github.com/Glutanimate/hunspell-en-med-glut on Github which appears to be a quality, active project. Using Homebrew, I installed hunspell on my Mac to validate the dictionary.
me$ brew install hunspell

en-med-glut is a “special” dictionary, an extension of your base language dictionary. So, you need to load one of those into hunspell prior to loading en-med-glut. Chances are you already have dictionary files on your machine somewhere, but I went ahead and downloaded the en_US dictionary from SCOWL (And Friends). You can find other sources and details in the Elasticsearch hunpell docs.

Because the dictionaries that I downloaded weren’t in my standard path location, I used some environment variables to point to them, as described in this tutorial.

me$ env
...
DICPATH=/Users/me/dev/en_US
DICTIONARY=en_US

The hunspell -D should report something like this
me $ hunspell -D
...
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
./en_US_OpenMedSpel
./en_US/en_US
/usr/share/hunspell/en_med_glut
LOADED DICTIONARY:
./en_US/en_US.aff
./en_US/en_US.dic
Hunspell 1.3.3

You can check for a word by typing into STDIN here, but you aren’t yet using the medical dictionary; it’s available, but not yet loaded. Use hunspell -d:
me $ hunspell -d en_US,en_med_glut
Hunspell 1.3.3

Now test by misspelling a known term and to see if you get suggestions back:

astromreplicell
astromReplicell 2 0: AastromReplicell, gastroepiploic

Two suggestions! Success!

I haven’t seen the dictionary in action within Blackboard, but our LMS Admin tells me that it worked after creating a new dictionary in Blackboard, uploading Hunspell, and then removing the existing default dictionary file.

Hunspell for medical terms spell-checking

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s