Skip to content

Commit

Permalink
Fix typo in word_tokenize docstring
Browse files Browse the repository at this point in the history
Unless I'm misunderstanding something, `nltk.tokenize.word_tokenize()` splits text into words, not into sentences (which `nltk.tokenize.sent_tokenize()` does).
  • Loading branch information
gmarmstrong authored Apr 13, 2017
1 parent 472382b commit aea7b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nltk/tokenize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def word_tokenize(text, language='english'):
along with :class:`.PunktSentenceTokenizer`
for the specified language).
:param text: text to split into sentences
:param text: text to split into words
:param language: the model name in the Punkt corpus
"""
return [token for sent in sent_tokenize(text, language)
Expand Down

0 comments on commit aea7b84

Please sign in to comment.