adding Hunspell to Scala project

157 views Asked by At

I'm working on a Scala project and wanted to play around with Hunspell. Since Hunspell seems to compile to native, it seems I need a JNA/JNI based API to deal with it. The link to the JNA version offered on the original Hunspell site is broken, though I managed to get the JNI version.

I've heard that JNA tends to be easier to use, which is what I'm looking for right now. I did find this repo: https://github.com/dren-dk/HunspellJNA, but it hasn't been updated in several years, so I'm not sure if it's a good idea to use it. I can't tell if it's a good version, or just someone's pet project that they abandoned halfway through.

My questions:

  1. Is it a good idea to use this repo I found?
  2. Does anyone know of a better way to use Hunspell with a Scala project?
1

There are 1 answers

0
wheeeee On

I ended up using the BridJ version.

It seems to be a much simpler, bare bones version that's available on Maven Central, so I simply added the following line to my build.sbt.

"com.atlascopco" % "hunspell-bridj" % "1.0.4"

Github: https://github.com/thomas-joiner/HunspellBridJ

Maven: http://search.maven.org/#artifactdetails%7Ccom.atlascopco%7Chunspell-bridj%7C1.0.4%7Cjar