Can anyone give any idea on how to implement a spelling checker that suggests nearest words as in MS-WORD and others.

Also what are the main data structures needed?