Hell Lars, > Laurent Godard wrote: > >> Single letters seem not being detected as errors even if not in the >> dictionary. > > A similar question: Has anybody tried to spell check whitespace?
No. This is not possible with the current spell checking design. The breakiterator is used to obtain word by word. And even if it is configured to return punctuation as well it does not include white spaces. (At least this is the state of affairs as I know it.) > That is, to write software that approves comma followed by > whitespace, but detects an error if whitespace is followed by > comma. Today's spell checkers (back to ispell) all seem to split > the text into words and non-words and then only spell check the > words. Wouldn't it make just as much sense to spell check the > non-words? There are rules for each language. For example, > whitespace before colon is OK in French, but mostly wrong in > English and Swedish. In general it does not make sense because of the various spell checker implementations I encountered none ever featured this for word-by-word spell checking. And word-by-word is the limitation of the current spell checker API. A sentence based spell or grammar checking should be able to do that. But if it actually does will depend on the specific implementation. > You could also want to spell-check numbers so that decimals and > thousands are properly written 1,234,567.89 and not 1,23,4567.89. > (For Swedish, that would be decimal comma and non-breakable space > for the thousands instead.) Or if it is an IP address > 123.456.78.90 the software could remark that 456 is out of range. Spell checking numbers is already possible. (Results depending on the spell checker used). There is an option for this (sth like "check words with numbers") and by default it is turned off. > A more clever spell checker could also detect 31st April as an > error. And even Monday June 19, 2007, since that is a Tuesday. I think here you are expecting too much from a spell or grammar checker. Even though it can be done it is much unlikely. It is similar to check "green sun" and "blue apple" and nobody is going to do that. Especially since such constructs might be Ok in literacy (e.g. fiction). Also there are other calendars in use e.g. Julian or Byzantine. And the day of the week varies in those. But it should still be Ok to cite sth like "Monday June 19, 2007 in Julian calendar corresponds to ... in the Gregorian calendar." And to check that it will require actual understanding of the sentence. > Will such tests be part of a planned grammar checker? Don't know... What a single grammar checker chooses to check and what not is not is up to it's implementation. I can only tell you that the API would allow for such things, since the checker gets passed the whole sentence (unlike to what happens for spell checking) and may report errors anywhere in it. Regards, Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
