Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

word_tokenize

>>> from nltk.tokenize import word_tokenize
>>> s = '''Good muffins cost $3.88
in New York.  Please buy me
... two of them.

Thanks.'''
>>> word_tokenize(s)
['Good', 'muffins', 'cost', '$', '3.88', 'in', 'New', 'York', '.',
'Please', 'buy', 'me', 'two', 'of', 'them', '.', 'Thanks', '.']
Source by www.nltk.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+9 =