I have decided to keep my grammar checker small, mostly just a wrapper around ChkTeX and JLanguageTool. Thus my code is likely to remain small enough to be included in LyX. However my prototype is easy to distribute separately from LyX and does not require any (re)compiling or installing. It would probably be best for my code to remain separate for the time being.
I have changed this prototype to use the chktex error interface. I may need to use IPC; I know LyX-server uses named pipes. Out of TCP sockets, unnamed sockets, named pipes and unnamed pipes which are portable across the architectures LyX supports? Although this is a prototype (written in Perl) it provides full featured grammar checking with probabilistic grammar parsing thanks to JLanguageTool. It seems to be ready for real world use; it does not generate errors if it is too stupid to understand your grammar. Instead it will report an error if your text matches one of ~400 rules describing common errors. It is relatively easy for a technical person to disable or customize each rule. HOW TO USE: Unpack lyx-gc (11KB download) http://dansted.org/lyx-gc-0.3.tar.bz2 and run lyx-gc-0.3/lyx-gc. Reconfigure if the Edit->Check Tex option is not available. Now, when you activate the Edit->Check Tex option, lyx-gc will check your document for grammatical errors. If no grammar errors are found, the Check Tex option will check your document for tex errors as normal. For more information, see the README. -- John C. McCabe-Dansted Masters Student