[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grammar check
From: |
Rik |
Subject: |
Re: grammar check |
Date: |
Thu, 17 Jun 2010 09:36:37 -0700 |
Ben Abbott wrote:
> I noticed your grammar check patch.
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/fbd7843974fa
>
> Do you have a script for checking grammar?
Indeed I do. I'm dedicated, but not dedicated enough to want to
periodically read all of Octave's documentation.
The script is written in Perl which seems fine since this is a
developer-only tool and won't need to be distributed. I've been trying to
get it into proper shape so that I can commit it along with some
instructions on use. Before I get there, however, I need to add some
exception handling mechanism and a dictionary of exceptions. No matter how
smart the code is, there are always some cases where the grammar rules
shouldn't be applied. I also have a spellcheck dictionary of exceptions
for Octave.
The current grammar rule set is:
#Rule: Use Texinfo @dots macro instead of 3 periods
#Rule: TeX, LaTeX should appear using macro to produce desired symbol
#Rule: MATLAB and other package names should use small caps macro
#Rule: Commas surrounding Latin abbreviations such as i.e.
#Rule: Hyphenate following terms:
#Rule: non-negative, one-dimensional, [xyz]-axis
#Rule: Capitalize Cartesian
#Rule: No line break in middle of environment variable
#Rule: Sentences must begin with period and *two* spaces
#Rule: Sentences must start with two spaces but not 3
#Rule: Space between return value of function and equality sign
#Rule: No double space between equality sign and input arguments
#Rule: Eliminate words repeated twice in succession
#Rule: Double spaces between words are typos
#Rule: Images should be centered, 4 inches wide
#Rule: Examples larger than 1 line should use @group
#Rule: Examples greater than $max_group_lines should not be grouped
#Rule: to allow TeX to find a reasonable page break
#Rule: @iftex followed by @tex blocks simplified to just @tex
--Rik