Hello,

On Fri, Jun 15, 2012 at 1:10 AM, raishilpa <raishilpa....@gmail.com> wrote:
> I want a code which can correct the spelling mistakes  as well as
> grammatical mistakes in the sentences...that is if I am writing following
> sentence:
>
> I want too meet my frnd bt due to hectic shcedule I cant
>
> I want output in following way:
>
> I want to met my friend but due to hectic schedule I can't.

  In general, you would build a dictionary, look up for every word in
the input whether it is in the dictionary, and if not, which is the
most similar word using some string metric.

  You will, however, face problems:

  - No dictionary is ever complete
  - Some wrong words are equally similar to multiple correct words
(e.g. should "bt" be "bit" or "but" or "bat"?)
  - Not all errors lead to wrong words (e.g. "Sum errors will will nut
bee fond because they happen to leed two sentence consisting of reel
word")

  It is therefore doubtful that spell-correction can be done non-interactively.

     Take care
     Oliver

-- 
Oliver Ruebenacker
Bioinformatics Consultant (http://www.knowomics.com/wiki/Oliver_Ruebenacker)
Knowomics, The Bioinformatics Network (http://www.knowomics.com)
SBPAX: Turning Bio Knowledge into Math Models (http://www.sbpax.org)

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to