打开 Office 拼写检查器/Java API

发布于 2024-09-02 12:18:42 字数 71 浏览 2 评论 0原文

是否可以在 Open Office 之外为其他 Java 程序使用 Open Office 拼写检查器?

瓦尔特

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

Walter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云仙小弟 2024-09-09 12:18:42

我们已经做到了这一点 - 使用 java 的 hunspell 引擎。有一个 JNA 桥可用于从 java 调用 hunspell。非常好用 - 负责从 jar 中加载适当的本机库。

唯一的问题是桥没有使用最新的 hunspell 引擎进行更新 - 它的版本为 1.1.12,而在我查看时(去年),hunspell 为 1.2.18,其中包含我们需要的修复。构建 hunspell 库并使用最新的 hunspell 引擎重建 JNA 包装器并不是什么大问题,尽管它确实涉及跨平台编译。 IIRC,我们使用 Windows 盒子和 Linux 盒子来重建这两个平台(Windows 上的 cygwin 没有削减它),并且我们不需要 OS X 版本。如果有用的话,我可以让你拥有我们构建的东西。

请参阅

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

指尖上的星空 2024-09-09 12:18:42

OpenOffice 只是使用 hunspell 进行拼写检查 - 您应该调查它。它的主页提到了两个 java 接口/端口的存在。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文