This is actually on the main page of nltk.org:
>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning
... Arthur didn't feel very good."""
>>> tokens = nltk.word_tokenize(sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning',
'Arthur', 'did', "n't", 'feel', 'very', 'good', '.']
Related Contents:
- How to get rid of punctuation using NLTK tokenizer?
- How to use Stanford Parser in NLTK using Python
- Python NLTK pos_tag not returning the correct part-of-speech tag
- Creating a new corpus with NLTK
- Stopword removal with NLTK
- Ordinal numbers replacement
- How to config nltk data directory from code?
- Classification using movie review corpus in NLTK/Python
- Convert words between verb/noun/adjective forms
- nltk NaiveBayesClassifier training for sentiment analysis
- NLTK Named Entity recognition to a Python list
- Using NLTK and WordNet; how do I convert simple tense verb into its present, past or past participle form?
- Python – RegEx for splitting text into sentences (sentence-tokenizing) [duplicate]
- Computing N Grams using Python
- English grammar for parsing in NLTK
- NLTK and language detection
- Fast/Optimize N-gram implementations in python
- Extract Word from Synset using Wordnet in NLTK 3.0
- How to apply NLTK word_tokenize library on a Pandas dataframe for Twitter data?
- How do I do dependency parsing in NLTK?
- training data format for NLTK punkt
- How to tweak the NLTK sentence tokenizer
- Refering to a directory in a Flask app doesn’t work unless the path is absolute
- Calculate cosine similarity given 2 sentence strings
- How do I download NLTK data?
- How to compute the similarity between two text documents?
- How to remove stop words using nltk or python
- How to determine the language of a piece of text?
- Why is my NLTK function slow when processing the DataFrame?
- n-grams in python, four, five, six grams?
- wordnet lemmatization and pos tagging in python
- Failed loading english.pickle with nltk.data.load
- How do I compute the similarity between two text documents?
- Python: tf-idf-cosine: to find document similarity
- All synonyms for word in python? [duplicate]
- Opening A large JSON file
- NLTK-based text processing with pandas
- Fuzzy String Comparison
- NLTK Tagging spanish words using a corpus
- Counting the Frequency of words in a pandas data frame
- Efficiently count word frequencies in python
- nltk doesn’t add $NLTK_DATA to search path?
- LDA model generates different topics everytime i train on the same corpus
- error installing nltk supporting packages : nltk.download()
- NLTK download SSL: Certificate verify failed
- Extract list of Persons and Organizations using Stanford NER Tagger in NLTK
- How can I split a string of a mathematical expressions in python?
- How to get all the hyponyms of a word/synset in python nltk and wordnet?
- Spell Checker for Python
- Tokenize a paragraph into sentence and then into words in NLTK