I recently noticed a node where the OP asked about a 'scaler', when most of us know they meant scalar. Naturally, someone considered the node for editing s/scaler/scalar/;.

I couldn't find anything about it - perhaps my search terms were off... but could we have some intelligence in the searches for commonly misspelled (or mis-termed?) terms? scaler->scalar comes to mind, as does trinary->ternary*.

Seems to me this wouldn't be that much skin off our collective nose (performance-wise), given a sufficiently small dictionary of common misspellings/misused/mistaken terms, of which I can't think of too many others at the moment. But I certainly wouldn't recommend this approach for regular dictionary words - just very perl-centric terms.

 

 

* Not technically a misspelling. But I think you know what I mean :)



--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}

Replies are listed 'Best First'.
Re: Synonyms/misspellings and searching
by ww (Archbishop) on Sep 03, 2006 at 23:45 UTC
Re: Synonyms/misspellings and searching
by shmem (Chancellor) on Sep 04, 2006 at 21:11 UTC
    The node Use of a global scalar got corrected in the meantime...

    While implementing some fuzzy search would no doubt be great fun, the human-driven spell correction in titles and body of nodes is probably less difficult to implement (since it already works), less error prone and... more useful: a node with good content but bad spelling (due to lack of english, stegalhenics or such) will get fixed; nodes which show a lousy attitude towards the community (not caring about how it's written, just "gimme") eventually will not.

    Let them rot in darkest corners of the database.

    <update> Synonyms is another topic, though, and worth implementing.</update>

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

      I think the OP is more focussed on the search side of the problem--node get fixed pretty quickly. For example, if someone were to search for 'scaler context' the results would not be as helpful as if they used the correct spelling.

      Perhaps, rather than automatically substituting the search terms, a suggested spelling revision (like Google provides) could be offered. That way if one wanted to know how to scale something, one could get an uncluttered search for 'scaler'.


      TGI says moo

Re: Synonyms/misspellings and searching
by stonecolddevin (Parson) on Sep 03, 2006 at 19:17 UTC

    I'm all for it. However, it would have to be a small library, because you'd get into writing a language parser in that it would have so many words to contextualize it would probably bring up more erroneous suggestions than not.

    I think it's a good idea though, ++ for you :-)

    meh.