You are on page 1of 2

Python 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.

1929 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
from nltk.book import*
*** Introductory Examples for the NLTK Book ***
Loading text1, ..., text9 and sent1, ..., sent9
Type the name of the text or sentence to view it.
Type: 'texts()' or 'sents()' to list the materials.
text1: Moby Dick by Herman Melville 1851
text2: Sense and Sensibility by Jane Austen 1811
text3: The Book of Genesis
text4: Inaugural Address Corpus
text5: Chat Corpus
text6: Monty Python and the Holy Grail
text7: Wall Street Journal
text8: Personals Corpus
text9: The Man Who Was Thursday by G . K . Chesterton 1908
text5
<Text: Chat Corpus>
bWordsText5 = [word for word in text5 if word.startswith('b') or
word.startswith('B')]
sortedSetBWordsText5 = sorted(set(bWordsText5))
print(sortedSetBWordsText5)
['B', 'BAAAAALLLLLLLLIIIIIIINNNNNNNNNNN', 'BE', 'BIG', 'BLONDES', 'BOOTS', 'BOOTY',
'BOY', 'BUT', 'BUt', 'BYE', 'Back', 'Barbieee', 'Barometer', 'Beach', 'Because',
'Been', 'Ben', 'Benjamin', 'Better', 'Bible', 'Biiiiiitch', 'Biographys',
'Birdgang', 'Bloooooooood', 'Bloooooooooood', 'Bloooooooooooood', 'Bone', 'Bonus',
'Books', 'Boone', 'Booyah', 'Borat', 'Born', 'Box', 'Boyz', 'Break', 'Breaking',
'Broken', 'Bud', 'Burger', 'But', 'Bwhaha', 'Bye', 'b', 'b-day', 'b/c', 'b4',
'babay', 'babble', 'babblein', 'babe', 'babes', 'babi', 'babies', 'babiess',
'baby', 'babycakeses', 'bachelorette', 'back', 'backatchya',
'backfrontsidewaysandallaroundtheworld', 'backroom', 'backup', 'bacl', 'bad',
'bag', 'bagel', 'bagels', 'bahahahaa', 'bak', 'baked', 'balad', 'balance', 'balck',
'ball', 'ballin', 'balls', 'ban', 'band', 'bandito', 'bandsaw', 'banjoes',
'banned', 'baord', 'bar', 'barbie', 'bare', 'barely', 'bares', 'barfights',
'barks', 'barn', 'barrel', 'base', 'bases', 'basically', 'basket', 'battery',
'bay', 'bbbbbyyyyyyyeeeeeeeee', 'bbiam', 'bbl', 'bbs', 'bc', 'be', 'beach',
'beachhhh', 'beam', 'beams', 'beanbag', 'beans', 'bear', 'bears', 'beat', 'beaten',
'beatles', 'beats', 'beattles', 'beautiful', 'because', 'beckley', 'become', 'bed',
'bedford', 'bedroom', 'beeeeehave', 'beeehave', 'been', 'beer', 'before', 'beg',
'begin', 'behave', 'behind', 'bein', 'being', 'beleive', 'believe', 'belive',
'bell', 'belly', 'belong', 'belongings', 'ben', 'bend', 'benz', 'bes', 'beside',
'besides', 'best', 'bet', 'betrayal', 'betta', 'better', 'between', 'beuty', 'bf',
'bi', 'biatch', 'bible', 'biebsa', 'bied', 'big', 'bigest', 'biggest', 'biiiatch',
'bike', 'bikes', 'bikini', 'bio', 'bird', 'birfday', 'birthday', 'bisexual',
'bishes', 'bit', 'bitch', 'bitches', 'bitdh', 'bite', 'bites', 'biyatch', 'biz',
'bj', 'black', 'blade', 'blah', 'blank', 'blankie', 'blazed', 'bleach', 'blech',
'bless', 'blessings', 'blew', 'blind', 'blinks', 'bliss', 'blocking', 'bloe',
'blood', 'blooded', 'bloody', 'blow', 'blowing', 'blowjob', 'blowup', 'blue',
'blueberry', 'bluer', 'blues', 'blunt', 'board', 'bob', 'bodies', 'body', 'boed',
'boght', 'boi', 'boing', 'boinked', 'bois', 'bomb', 'bone', 'boned', 'bones',
'bong', 'boning', 'bonus', 'boo', 'booboo', 'boobs', 'book', 'boom',
'boooooooooooglyyyyyy', 'boost', 'boot', 'bootay', 'booted', 'boots', 'booty',
'border', 'borderline', 'bored', 'boredom', 'boring', 'born', 'born-again',
'bosom', 'boss', 'bossy', 'bot', 'both', 'bother', 'bothering', 'bottle', 'bought',
'bounced', 'bouncer', 'bouncers', 'bound', 'bout', 'bouts', 'bow', 'bowl', 'box',
'boy', 'boyfriend', 'boys', 'bra', 'brad', 'brady', 'brain', 'brakes', 'brass',
'brat', 'brb', 'brbbb', 'bread', 'break', 'breaks', 'breath', 'breathe', 'bred',
'breeding', 'bright', 'brightened', 'bring', 'brings', 'bro', 'broke', 'brooklyn',
'brother', 'brothers', 'brought', 'brown', 'brrrrrrr', 'bruises', 'brunswick',
'brwn', 'btw', 'bucks', 'buddyyyyyy', 'buff', 'buffalo', 'bug', 'bugs', 'buh',
'build', 'builds', 'built', 'bull', 'bulls', 'bum', 'bumber', 'bummer', 'bumped',
'bumper', 'bunch', 'bunny', 'burger', 'burito', 'burned', 'burns', 'burp',
'burpin', 'burps', 'burried', 'burryed', 'bus', 'buses', 'bust', 'busted', 'busy',
'but', 'butt', 'butter', 'butterscotch', 'button', 'buttons', 'buy', 'buying',
'bwahahahahahahahahahaha', 'by', 'byb', 'bye', 'byeee', 'byeeee', 'byeeeeeeee',
'byeeeeeeeeeeeee', 'byes']

You might also like