开发者

Open Office Spellchecker / Java API

Is it possible to make use of the 开发者_StackOverflowOpen Office spell-checker outside of Open Office for other Java programs?

Walter


We have done exactly that - used the hunspell engine from java. There is a JNA bridge that can be used to invoke hunspell from java. Very nice to use - takes care of loading the appropriate native library from the jar.

The only problem is that the bridge is not updated with the latest hunspell engine - it is at version 1.1.12, and at the time I looked (last year), hunspell was at 1.2.18, which contained fixes we needed. It's not a big deal to build the hunspell libraries and rebuild the JNA wrapper with the latest hunspell engines, although it does involve cross-platform compilation. IIRC we used a windows box and a linux box to rebuild both those platforms (cygwin on windows didn't cut it) and we didn't need the version for OS X. I can let you have what we built if that's useful.

See

  • Java API for Hunspell
  • jna.dev.java.net


OpenOffice simply uses hunspell for the spell checking - you should investigate it instead. Its home page mentions the existence of two java interfaces/ports.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜