My Code:
import nltk.data
tokenizer = nltk.data.load(\'nltk:tokenizers/punkt/english.pickle\')
ERROR Message:
[ec2-user@ip-
import nltk
nltk.download('punkt')
Open the Python prompt and run the above statements.
The sent_tokenize function uses an instance of PunktSentenceTokenizer from the nltk.tokenize.punkt module. This instance has already been trained and works well for many European languages. So it knows what punctuation and characters mark the end of a sentence and the beginning of a new sentence.