Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • this doesn't help me, because I feed the string through nltk and it thinks don is a separate word, cutting off the word don't Commented Oct 16, 2015 at 11:56
  • i think this is a nltk problem then, thanks for the help Commented Oct 16, 2015 at 12:06
  • 2
    It's not an nltk "problem". The backslashes are how python is showing you that the string doesn't end at the apostrophe, as everyone has said. The usual NLTK tokenization intentionally breaks up words at the apostrophe; this has nothing to do with the backslashes. Commented Oct 16, 2015 at 20:49