lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Strip markup for spell checking?


From: Greg Chicares
Subject: [lmi] Strip markup for spell checking?
Date: Wed, 28 Oct 2015 15:47:15 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

I'm looking for a way to check spelling in XSL files, excluding markup.
Here's a motivating example: a spelling error introduced in 2007
  http://svn.savannah.nongnu.org/viewvc?view=rev&root=lmi&revision=2814
which is still in HEAD today, so we'll apply a patch like this soon:

--- nasd.bak    2015-10-28 14:21:32.000000000 +0000
+++ nasd.xsl    2015-10-28 14:52:30.000000000 +0000
@@ -621,7 +621,7 @@
               </xsl:if>
               <xsl:if test="$scalars/CustomFund='1'">
                 <fo:block padding-top="1em">
-                  Investment management fees are based on an inital allocation
+                  Investment management fees are based on an initial allocation
                   of 100% of a custom fund selected by the purchaser.
                 </fo:block>
               </xsl:if>

I found that by stripping markup in this naive way:

/lmi/src/lmi[0]$<nasd.xsl sed -e'/<.*>/d' >/dev/clipboard

and pasting the result into the 'icedove' email program as though it
were a message, and then using the email spelling checker.

That can't be the best possible way. What would be better? Ideally
we'd like to check
  /*
   * C comments, and...
   */
  // ...C++ comments, and...
  char const* xyzzy="...literal text in strings"
as well as XSL...and who-knows-what in other types of files.

Would gnu 'aspell' be useful for this purpose? (I've never tried it,
but we could add it to our Cygwin toolchest.) No doubt it doesn't
recognize life-insurance "words of art", but I would hope we could
add to its dictionary locally. (I just tried to find that out, but
when I looked at the manual, I froze at its third sentence:
  http://aspell.net/
| it does a superior job ... than just about any other spell checker
                             ^^^^
The word "superior" takes the preposition "to". So I started again
at the first sentence, and froze again at its seventh and eight words:
| GNU Aspell is a Free and Open Source
  ^^^                      ^^^^^^^^^^^
because its first word suggests this should apply:
  http://www.gnu.org/philosophy/free-software-for-freedom.en.html
I quickly decided to redirect such attention to lmi's own text.)

I don't seriously hope for a tool that can reliably point out subtler
problems (above, one would allocate 100% of payment "to" [not "of"] a
custom fund). It would save us considerable time and effort if we had
a tool that simply points out obvious misspellings.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]