Hi all, I've made a simple implementation of grammar checker for OOo with English and Chinese support. You can get the code here: http://nlp.cosoft.org.cn/soc/gco.tgz. A few idl files are also included as reference which define interfaces that I use for now. *NOTE*: I didn't have time to handcraft rules, so just a few example rules are included as a demonstration and most sentences would just pass the grammar checking by this time.
The following is copied from the README file in the tarball: ======================================== ACKNOWLEDGEMENT: *Thanks to Google's Summer of Code program* COMPILE: To compile the code, you need: 1. OpenOffice.org SDK 2.0, get it from http://openoffice.org 2. boost library, get it from http://sourceforge.net/project/showfiles.php?group_id=7586 and if you are using gcc, note there is ABI change from gcc3.3 to gcc3.4/4.0. So make sure your compiler version match that of compiling SDK and boost. ### Begin "For Debian users" ### If you are using Debian, you can get OpenOffice.org SDK 2.0 from experimental: 1. make sure you have experimental sources in your /etc/apt/sources.list: deb http://ftp.us.debian.org/debian ../project/experimental main deb-src http://ftp.us.debian.org/debian ../project/experimental main 2. update to install OpenOffice.org SDK 2.0 & boost library: # apt-get update # apt-get install gcc g++ # apt-get -t experimental install openoffice.org2-dev # apt-get install libboost-dev libboost-regex-dev ### End "For Debian users" ### There is a simple makefile in the tarball (only tested on Linux), in sdk environment I just uncompress the tarball in sdk/, which makes a gco directory, then cd into gco and type "make" then "make GrammarChecker.runexe". An example English sentence will be checked, which is hardcoded in main() as a test in the code, you can change the sentence by editing GrammarChecker.cxx. To test Chinese, edit zh_CN.test, then "make clean" and "make" again, or just copy zh_CN.test to the same directory of the GrammarChecker binary, e.g. on Linux it's sdk/LINUXexample.out/bin/. *NOTE*: 1. For now we only have a few example rules in our rule files, so most sentences will just pass the grammar checking. 2. There are a few idl files descibing the interfaces I expect to use, only for reference purpose for now. 3. Data files must be in UTF-8. The output of Chinese grammar checking is only correct in UTF-8 locale. 4. The code is far from complete, use it at your own risk. If you have any comments or suggestions, please send to [EMAIL PROTECTED] Thanks! ========================================= Regards, Keli --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
