While there are spell-checkers but AFAIK they are limited to spell-checking. Are there any grammar-checking utilities in free software and more precisely Debian. Even if not in Debian, then in free software. I am using the spell-checking tag as those folks would probably be also interested in this.
Debian – grammar-checker under linux
debianspell-checking
Related Solutions
Aspell Author Here.
As I said in an earlier answer, you can't just combine dictionaries from different languages and expect it to work. You need to create a new language that combines the features of the two original languages.
Fortunately for English and German this is fairly easy; however, the suggestion quality will suffer for English words since we will disable the use of soundslike lookup.
Install the aspell-en and the aspell-de dictionary package
Go to a empty directory to keep everything clean. Also to avoid any charset issues change the locale to "C" by setting
LC_ALL=C
.Dump the English and German dictionaries into plan wordlists
aspell dump master en > en.txt aspell dump master de > de.txt
Combine en.dat and de.dat, which you can generally find in
usr/lib/aspell
.The English dictionary uses soundslike lookup but that won't with the German dictionary (due to the fact that it is English specific, and more importable it is incompatible with Affix compression) so we will disable it. The English dictionary doesn't use affix compression but the German dictionary does so we will just use the affix file for the German dictionary. (This will avoid having to expand the German dictionary and thus increasing it size).
We will call the language qed, 'q' since very few languages start with q, 'e' for English, and 'g' for German. (The language name should generally be 2 to 3 letters, but aspell doesn't really care, so en-de or some other name might work, but a 2 or 3 letter name is guaranteed to work)
The file will be named
qed.dat
and contain the following:name qed charset iso8859-1 special ' -*- soundslike none affix qed affix-compress true
Copy
de_affix.dat
into the current directory and rename itqed_affix.dat
.Create the combined dictionary:
cat en.txt de.txt | aspell create master -l ./qed ./qed.rws
Create the file
qed.multi
:add qed.rws
Test the dictionary by using
-d ./qed
. the./
is needed to force aspell to search the current directory.Install
qed.dat
qed.rws
qed.multi
andqed_affix.dat
somewhere where aspell will find it. Please see the manual for info on how aspell searches for dictionary and language data files.Done. Everything should work now. A more sophisticated solution will enable some form of soundslike lookup for better suggestion quality. But that requires special care when used with affix compression (see the Aspell manual for details). As an alternative the German dictionary can be expanded and the English soundlike lookup can be used, but that might not work so well on German words.
The case of combing English and German was easy because they both use the same charset (iso-8859-1) and because only one language used Affix compression. Combining other languages will take more work but it is possible once you know what you are doing. I spelled out the steps here in detail to give readers some idea of how Aspell works so a similar thing can be used for other language combinations.
If both languages use affix compression, either the affix files will need to be combined so there are no conflicting flags, or one of the dictionaries will need to be expanded.
If the two languages use a different 8-bit charset than a compatible charset that can support both languages we need to be used. If a standard one doesn't exist, than a new one can be created. To avoid confusion the wordlists should be converted to utf-8 and Aspell should be instructed to expect all input and output in utf-8 instead of the charset that is used internally, which for historical reasons is the default.
You could mail-order a set of Debian DVDs, copy them to your hard disk and keep them up-to-date with debmirror
.
Another variation on the same idea is to use a USB drive with enough space and debmirror
at a location with good, fast, cheap internet access to do the initial mirror and then keep it updated with debmirror at your slow internet. Or, get someone to do the initial mirror for you and mail it to you.
You can probably do similar things with rpm/yum repos, but I'm not as familiar with the tools.
Note that with limited internet access, you're probably better off using apt-cacher-ng
than mirroring Debian. Comment out the deb-src
lines in your sources.list file(s) unless you actually need to download source packages.
Best Answer
You can try this Python library:
http://www.nltk.org/
You should not look for a Linux program that does this, but for a Python / Java / PHP / C++ app that does this. Any language that can run under Linux will do. I've googled for "python grammar checker".