Hello, we are looking at improving the LT plugin for LyX. We currently use the command-line interface, but due to Java’s startup time this is rather slow and not particularly well suited to as-you-go grammarchecking. The HTTP interface seems to be preferred by the LT developers but it is not clear if there is a preferred way of dealing with issues such as the following:
- We probably don’t want to accept requests over the network (I presume the LT server doesn’t do this by default)
1b) … or ideally even from other users?
- We don’t want to send possibly private text to a LT server run by an untrusted user.
- We only need one server per user (perhaps less if a trusted user has a server running)
- We don’t want to keep a server running if all applications using it have been closed. (LanguageTool uses about 32MB of ram, I think)
Some of these issues could be deal with by the LyX team independently, but I wouldn’t want to reinvent the wheel. Further in principle LyX could share an LT server with abiword etc., but that wouldn’t happen if we use a different protocol.
It seems that these issues could be dealt with by a common C library that hides such issues from application developers, presenting them with a single function such as: char** languagetool(char* lang, char* text), perhaps with asynchronous extensions.
Given that plugins for C++ have already been written, has anyone made something like this? Is there an alternate preferred way to handling these issues?