This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Translation of [Peter Norvig's spell checker](http://norvig.com/spell-correct.html) into Swift. | |
/// Sample input corpus [here](http://norvig.com/big.txt) | |
import Foundation.NSString // purely for IO, most things done with Swift.String | |
// pythony slicing | |
postfix operator ..< { } | |
prefix operator ..< { } | |
postfix func ..<<I: ForwardIndexType>(lhs: I) -> RangeStart<I> { return RangeStart(start: lhs) } | |
prefix func ..<<I: ForwardIndexType>(rhs: I) -> RangeEnd<I> { return RangeEnd(end: rhs) } |