In the input, you have a row number of a sentence from the NLTK movie reviews corpus. Your task is to print out a positive sentence (from the positive subcorpus) as a list of tokens.
Text corpora in NLTK
Extract a positive sentence
Report a typo
Sample Input 1:
0Sample Output 1:
['films', 'adapted', 'from', 'comic', 'books', 'have', 'had', 'plenty', 'of', 'success', ',', 'whether', 'they', "'", 're', 'about', 'superheroes', '(', 'batman', ',', 'superman', ',', 'spawn', ')', ',', 'or', 'geared', 'toward', 'kids', '(', 'casper', ')', 'or', 'the', 'arthouse', 'crowd', '(', 'ghost', 'world', ')', ',', 'but', 'there', "'", 's', 'never', 'really', 'been', 'a', 'comic', 'book', 'like', 'from', 'hell', 'before', '.']Write a program in Python 3
# Don't download movie_reviews. Just import it
number = int(input()) # row number of a sentence in Movie reviews corpus
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.