Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Automatic spell checking when previewing

by gri6507 (Deacon)
on Sep 13, 2004 at 12:51 UTC ( [id://390538]=monkdiscuss: print w/replies, xml ) Need Help??

Fellow monks,

I cannot vouch for all the postings on this website, but all the ones that I have seen have been in English. At the same time, I can say with certainty that for a large portion of this community English is not a primary language. I think that this group (and all the native English speakers who simply type sloppily) could really benefit from a built in spell checker.

Just imagine, when submitting a question, next to the "Preview" button, there is also a "Spell Check" button. Alternatively, don't even give the users a choice. When previewing a message, automatically do the spell checking, and highlight the misspelled words.

  • Comment on Automatic spell checking when previewing

Replies are listed 'Best First'.
Re: Automatic spell checking when previewing
by gmax (Abbot) on Sep 13, 2004 at 13:27 UTC

    English is a foreign language to me, and I solve the problem using Vim for PerlMonks nodes and VimSpell, both integrated with some human judgment.

    YMMV, but you may use a similar off-line solution (as belg4mit suggested) to deal with misspelled words before posting.

    I don't like the idea of an automatic spell checker.

    Checking a PM post is not a task that can be idly assigned to a spell checker. You want to spell-check your statements, but spare everything inside a <code> block. OTOH, comments and POD inside a <code> block should be checked as well. Not your ideal candidate task for a spell checker.

    What then? I suggest using an off-line checker and applying some human knowledge of grammar: such combination is better than any automatic tool I have ever tried.

     _  _ _  _  
    (_|| | |(_|><
     _|   
    
      Why bother using HTML forms to post messages? We could just compose the messages on our PDAs, use PhatSpell to spell check, FTP our posts to the PM server (using Net::FTP, of course), and have daily cron jobs automatically add our comments to the html pages. It's so simple, I am shocked that no one has thought of it before.
Re: Automatic spell checking when previewing
by sintadil (Pilgrim) on Sep 13, 2004 at 13:06 UTC

    I think that this group (and all the native English speakers who simply type sloppily) could really benefit from a built in spell checker.

    Even as a native speaker who considers his spelling to be impeccable (mostly because he's a pedant :)), I think that this is a good idea.

    Just imagine, when submitting a question, next to the "Preview" button, there is also a "Spell Check" button. Alternatively, don't even give the users a choice. When previewing a message, automatically do the spell checking, and highlight the misspelled words.

    The first half is a good idea. I don't like the "automatic" part, because it would more than likely utilise JavaScript -- and I like being able to utilise all of PM's functionality in a browser that has zero JS support, like ELinks. That and my opinion on JS ... well ... :)

    Of course, you'd have to find a convenient way to skip all of those things which one commonly says on PM, like pieces of code and Jargon. I don't want to have to select "Yes, I mean TMTOWTDI" (remember, not all browsers have a mouse interface, or someone who can use said mouse) when I type TMTOWTDI.

Re: Automatic spell checking when previewing
by svsingh (Priest) on Sep 13, 2004 at 13:53 UTC
    If you're using Internet Explorer on Windows, then you may want to use ieSpell. It's a small browswer plugin that allows you to spell check forms (basically giving you a Spell Check button regardless of the site). I would imagine that there are comparable plugins for other browsers as well. Hope this helps.
Re: Automatic spell checking when previewing
by Limbic~Region (Chancellor) on Sep 13, 2004 at 14:02 UTC
    Ok - I wasn't going to reply to this node. I expected others to make my argument:

    Unless we can agree on what non-dictionary words we want added, it is going to be annoying to constantly see highlighted words that aren't actually mispelled. Having a personal "ignore" list is likely not feasible.

    Instead, what others have said is just to use something else before posting. While this works and is good advice as an interim solution - I think in the long run we should be adding features of convenience. That is the reason I wrote Monastic Slush Fund. Why not use money monks contribute to make these kinds of features happen?

    Cheers - L~R

    Update: I do not want to give the impression that I am necessarily for or against a spell checker. In addition to my rationale against it, demerphq points out it may be a significant load on the servers. My point is that we should not summarily dismiss feature requests because they are hard or because no one feels like working on them. We should consider using the monies contributed by monks to implement features that are in high demand.

      ...it is going to be annoying to constantly see highlighted words that aren't actually mispelled

      Is it?

      As for me, I got used to spellcheck my technical writings (and they are usually bilingual). Most of the time there are passages of text and passages of code there. It's very easy to spot a hilited word inside a mostly right text paragraph and to ignore hilited words inside code.

      BTW, all the code on PM is marked up so it would be very easy to automatically skip it when running spellchecker.

        BTW, all the code on PM is marked up so it would be very easy to automatically skip it when running spellchecker.

        If I run the sentence "TheDamian writes perlish code on perlmonks", which doesn't contain any word that is extremely rare on this site, through "spell", it finds three unknown words.

        This is a cutie too:

        for f in /usr/local/share/perl/lib/5.8.3/pod/*.pod do pod2text $f done | spell | wc -l 9154
Re: Automatic spell checking when previewing
by belg4mit (Prior) on Sep 13, 2004 at 13:22 UTC
    Write your comment in emacs, use ispell, cut and paste.

    --
    I'm not belgian but I play one on TV.

      This is even better if your browser is Firefox and you have the MozEX extension installed: no need to copypaste at all.

      Makeshifts last the longest.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Automatic spell checking when previewing
by idsfa (Vicar) on Sep 13, 2004 at 15:40 UTC

    As a way to shave some development time, here is a least one perlish possibility.

    I think it might be better to come up with a client-side solution as a way to offload the work to those who want the feature. Perhaps some CSS/JavaScript wizard can figure that out?

    Finally, here is an extension for you Firefox users with multiple dictionaries and personal dictionary support.


    If anyone needs me I'll be in the Angry Dome.
Re: Automatic spell checking when previewing
by Anonymous Monk on Sep 13, 2004 at 15:53 UTC
    Considering a typical posting on perlmonks is a mix of HTML, Perl code, jargon not found in typical wordlist used with spell checkers, and the odd URL, I'd say a spell checker could be tons of fun. Specially if you make its auto-correcting feature mandatory. I mean, if Microsoft can do an excellent job with Word (I never see any spelling mistakes in those documents, do you?), we can do too! Let's implement it today!
Re: Automatic spell checking when previewing
by ysth (Canon) on Sep 13, 2004 at 18:05 UTC
    Interesting to see other people's thoughts on this.

    I think a Spell Check button that would add color or other markup to unrecognized words would be a good thing, even if it didn't allow any personalized word lists.

    Update: Gack! No thanks to JavaScript.

      I am also in favor of a spell check. It could be done in JavaScript.
        JavaScript you say? You mean, at the client side? Do you want to sent the entire dictionary each time someone hits "reply"? Oh well, I guess the bandwidth of Perlmonks is free.
Re: Automatic spell checking when previewing
by krujos (Curate) on Sep 13, 2004 at 18:43 UTC
    Safari (possibly all of the browsers on a Mac since spell check is a core service) will allow you to spell check any text field by pressing cmd ;. Pretty handy, I am sure there has to be a spell check plug-in for most browsers. Are web based spell checkers really any good? I have used the gmail one and it is good in a pinch, but I recall being annoyed by the other ones I have tried (yahoo and hotmail are the only ones I can recall).
      Thanks for this post. I didn't realise Opera would provide spell checking in form fields just because aspell was installed. I have just looked at it now and it only seems to work in "textarea" boxes and not "text" input fields but it will keep me from copying and pasting into a google search query. :^)

      Spell checking in text areas isn't enabled in all OS X browsers. Only the ones that are Cocoa based (as opposed to Carbon). Mozilla, for example, can't do the spell check trick.

Re: Automatic spell checking when previewing
by neilh (Pilgrim) on Sep 14, 2004 at 02:03 UTC
    What version of English do you propose to have a spell check based on?
    US English is not my native language, and I would be reasonably unimpressed if my posts were converted into a "foreign" English.
    Neil
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Automatic spell checking when previewing
by bart (Canon) on Sep 13, 2004 at 14:12 UTC
    Your absolutely right.

    And yes, that was a joke. Even a perfect spellchecker wouldn't catch everything.

      So waht? It'll help to make nodes a little better.
Re: Automatic spell checking when previewing
by Your Mother (Archbishop) on Sep 13, 2004 at 17:45 UTC

    I also think a spell check on the site is probably a bad idea. It would need JavaScript to be useful (auto correct in the form fields) and personal dictionaries would be a problem; a universal one would be constantly corrupted by users who believed they could spell. :) Safari on Mac has spell checking in form fields and I think the Mozilla family also has plugins for spelling. That said, checking isn't too hard, even the comments in code could be checked pretty easily. Here's one way...

    update: added "+"s to the co+de, to make them close "better."
    update 2: proof of concept code's a bit long so put it in readmores.

Re: Automatic spell checking when previewing
by DrHyde (Prior) on Sep 14, 2004 at 08:45 UTC
    I am not hoppy with the very idea of a spill chucker. It can not replace the user checking his piste before hitting submit, because it won't catch any of the errors I've deliberately introduced on this paragraph.
Re: Automatic spell checking when previewing
by gaal (Parson) on Sep 14, 2004 at 07:22 UTC
    Yeah, and while we're at it how about a button to run perl -c on everything between CODE tags? :)
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://390538]
Approved by ikegami
Front-paged by rnahi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found