Pull request for  Ewan Klein's solution to https://github.com/nltk/nltk/issues/521

Pull request for  Ewan Klein's solution to https://github.com/nltk/nltk/issues/521