$ ls looking-glass.txt looking-glass.txt $ python Python 3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:38:53) [Clang 11.1.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> raw = open('looking-glass.txt', encoding='utf-8', errors='ignore').read() >>> len(raw) 164233 >>> raw[:100] '\ufeffTHROUGH THE LOOKING-GLASS\n\nAnd What Alice Found There\n\nBy Lewis Carroll\n\nThe Millennium Fulcrum Edi' >>> import re >>> re.findall(r'\b\w+ly\b', raw) ['Lily', 'lily', 'surely', 'melancholy', 'entirely', 'Really', 'reproachfully', 'demurely', 'gently', 'only', 'Only', 'comfortably', 'nearly', 'gently', 'seriously', 'really', 'only', 'only', 'really', 'suddenly', 'exactly', 'principally', 'properly', 'directly', 'only', 'only', 'only', 'only', 'only', 'only', 'hardly', 'certainly', 'lightly', 'brightly', 'only', 'nearly', 'violently', 'Lily', 'wildly', 'Lily', 'nearly', 'hastily', 'Lily', 'sulkily', 'anxiously', 'likely', 'slowly', 'gently', 'slowly', 'nearly', 'hardly', 'immediately', 'perfectly', 'hardly', 'really', 'only', 'exactly', 'suddenly', 'exactly', 'quickly', 'easily', 'gently', 'curiously', 'quickly', 'resolutely', 'really', 'actually', 'lily', 'gracefully', 'lily', 'lily', 'only', 'lily', 'really', 'lily', 'only', 'lily', 'passionately', 'lily', 'nicely', 'lily', 'lily', 'suddenly', 'lily', 'lily', 'eagerly', 'lily', 'kindly', 'eagerly', 'only', 'wonderfully', 'possibly', 'beautifully', 'nicely', 'only', 'only', 'shyly', 'only', 'pleasantly', 'easily', 'Lily', 'nearly', 'Nearly', 'hardly', 'suddenly', 'kindly', 'generally', 'only', 'naturedly', 'nearly', 'luckily', 'slowly', 'quickly', 'mostly', 'extremely', 'quickly', 'exactly', 'quickly', 'only', 'suddenly', 'only', 'angrily', 'extremely', 'impatiently', 'deeply', 'evidently', 'only', 'wonderfully', 'anxiously', 'really', 'quietly', 'only', 'quietly', 'certainly', 'quietly', 'carelessly', 'fly', 'fly', 'entirely', 'fly', 'fly', 'fly', 'holly', 'Butterfly', 'Butterfly', 'thoughtfully', 'anxiously', 'only', 'only', 'deeply', 'melancholy', 'really', 'chilly', 'certainly', 'only', 'thoughtfully', 'ugly', 'Only', 'suddenly', 'really', 'only', 'sadly', 'timidly', 'lovingly', 'suddenly', 'only', 'likely', 'only', 'suddenly', 'hardly', 'politely', 'only', 'exactly', 'briskly', 'only', 'certainly', 'suddenly', 'doubtfully', 'instantly', 'politely', 'gently', 'sulkily', 'fly', 'only', 'Conveniently', 'chiefly', 'deeply', 'scarcely', 'indignantly', 'likely', 'timidly', 'only', 'honestly', 'triumphantly', 'contemptuously', 'only', 'indignantly', 'only', 'only', 'cheerfully', 'really', 'only', 'hastily', 'only', 'wildly', 'immediately', 'only', 'sulkily', 'only', 'Really', 'gravely', 'possibly', 'certainly', 'gently', 'generally', 'only', 'sadly', 'only', 'generally', 'really', 'only', 'Only', 'suddenly', 'wildly', 'civilly', 'only', 'timidly', 'only', 'dreadfully', 'melancholy', 'gently', 'carefully', 'really', 'dreadfully', 'kindly', 'only', 'only', 'Only', 'triumphantly', 'exactly', 'directly', 'wildly', 'Only', 'Only', 'lonely', 'melancholy', 'only', 'exactly', 'exactually', 'politely', 'suddenly', 'really', 'really', 'gently', 'exactly', 'vainly', 'quietly', 'suddenly', 'hardly', 'directly', 'angrily', 'gently', 'really', 'gently', 'carefully', 'only', 'lovely', 'Only', 'certainly', 'lovely', 'only', 'hardly', 'cautiously', 'only', 'scornfully', 'only', 'timidly', 'Only', 'actually', 'only', 'clearly', 'easily', 'steadily', 'exactly', 'gently', 'evidently', 'softly', 'impatiently', 'doubtfully', 'simply', 'tremendously', 'hardly', 'unwisely', 'gently', 'nearly', 'anxiously', 'politely', 'triumphantly', 'thoughtfully', 'indignantly', 'suddenly', 'really', 'thoroughly', 'only', 'Evidently', 'really', 'thoughtfully', 'carefully', 'gaily', 'thoroughly', 'Certainly', 'only', 'contemptuously', 'particularly', 'gravely', 'kindly', 'thoughtfully', 'Exactly', 'hastily', 'entirely', 'really', 'sadly', 'only', 'severely', 'timidly', 'hardly', 'cheerfully', 'exactly', 'generally', 'only', 'quietly', 'instantly', 'busily', 'only', 'intently', 'slowly', 'only', 'simply', 'only', 'impatiently', 'only', 'only', 'wildly', 'greedily', 'simply', 'only', 'fearfully', 'only', 'only', 'affectionately', 'impatiently', 'only', 'Suddenly', 'eagerly', 'quietly', 'fearfully', 'softly', 'nervously', 'carelessly', 'instantly', 'eagerly', 'only', 'solemnly', 'dreamily', 'Certainly', 'certainly', 'lazily', 'eagerly', 'wearily', 'reply', 'evidently', 'slyly', 'nearly', 'angrily', 'diligently', 'reply', 'obediently', 'vainly', 'gradually', 'Only', 'suddenly', 'comfortably', 'timidly', 'doubtfully', 'evidently', 'easily', 'badly', 'friendly', 'gently', 'carefully', 'likely', 'likely', 'carefully', 'Only', 'hardly', 'anxiously', 'certainly', 'generally', 'suddenly', 'generally', 'gravely', 'heartily', 'anxiously', 'suddenly', 'suddenly', 'heavily', 'exactly', 'properly', 'smoothly', 'smoothly', 'thoughtfully', 'politely', 'only', 'thoughtfully', 'gravely', 'hastily', 'cheerfully', 'proudly', 'directly', 'seriously', 'instantly', 'really', 'quietly', 'certainly', 'eagerly', 'only', 'really', 'only', 'completely', 'really', 'slowly', 'clearly', 'only', 'kindly', 'quietly', 'melancholy', 'attentively', 'reply', 'gladly', 'chiefly', 'madly', 'mumblingly', 'only', 'doubtfully', 'slowly', 'easily', 'leisurely', 'possibly', 'stiffly', 'really', 'oddly', 'timidly', 'sharply', 'only', 'suddenly', 'really', 'only', 'only', 'impatiently', 'only', 'feebly', 'readily', 'cautiously', 'triumphantly', 'gravely', 'suddenly', 'eagerly', 'anxiously', 'gravely', 'triumphantly', 'stiffly', 'decidedly', 'hastily', 'nervously', 'only', 'mostly', 'exactly', 'generally', 'only', 'gently', 'timidly', 'really', 'really', 'eagerly', 'hardly', 'slowly', 'angrily', 'scarcely', 'impatiently', 'nervously', 'anxiously', 'Certainly', 'decidedly', 'hastily', 'quickly', 'only', 'reply', 'only', 'slowly', 'solemnly', 'lovely', 'politely', 'directly', 'queerly', 'eagerly', 'obediently', 'reply', 'decidedly', 'nearly', 'really', 'hastily', 'impatiently', 'fiercely', 'suddenly', 'merrily', 'only', 'really', 'respectfully', 'only', 'only', 'triumphantly', 'stiffly', 'patiently', 'Really', 'comfortably', 'only', 'really', 'only', 'dreamily', 'July', 'July', 'Lovingly'] >>> >>> len(re.findall(r'\b\w+ly\b', raw)) 532 >>> len(set(re.findall(r'\b\w+ly\b', raw))) 145 >>> set(re.findall(r'\b\w+ly\b', raw)) {'softly', 'madly', 'angrily', 'mumblingly', 'principally', 'obediently', 'mostly', 'actually', 'wonderfully', 'merrily', 'unwisely', 'gaily', 'thoughtfully', 'indignantly', 'only', 'Nearly', 'surely', 'lightly', 'quietly', 'hardly', 'suddenly', 'gradually', 'particularly', 'nicely', 'affectionately', 'Evidently', 'reply', 'clearly', 'simply', 'respectfully', 'kindly', 'decidedly', 'gravely', 'deeply', 'perfectly', 'exactly', 'diligently', 'stiffly', 'heartily', 'naturedly', 'solemnly', 'luckily', 'directly', 'melancholy', 'possibly', 'busily', 'immediately', 'beautifully', 'completely', 'lonely', 'easily', 'Lily', 'carefully', 'slyly', 'pleasantly', 'sadly', 'oddly', 'exactually', 'cautiously', 'properly', 'comfortably', 'demurely', 'seriously', 'fearfully', 'gladly', 'feebly', 'extremely', 'certainly', 'July', 'patiently', 'sharply', 'Conveniently', 'tremendously', 'eagerly', 'severely', 'entirely', 'friendly', 'dreadfully', 'curiously', 'quickly', 'chilly', 'carelessly', 'doubtfully', 'lovingly', 'proudly', 'chiefly', 'scarcely', 'generally', 'lily', 'passionately', 'briskly', 'likely', 'Certainly', 'smoothly', 'Really', 'steadily', 'hastily', 'wildly', 'ugly', 'fiercely', 'nearly', 'politely', 'Exactly', 'intently', 'triumphantly', 'instantly', 'wearily', 'gently', 'badly', 'contemptuously', 'Lovingly', 'cheerfully', 'impatiently', 'reproachfully', 'resolutely', 'Butterfly', 'holly', 'dreamily', 'civilly', 'queerly', 'slowly', 'evidently', 'readily', 'thoroughly', 'Only', 'lazily', 'attentively', 'lovely', 'violently', 'gracefully', 'heavily', 'sulkily', 'scornfully', 'Suddenly', 'timidly', 'greedily', 'really', 'shyly', 'honestly', 'leisurely', 'anxiously', 'vainly', 'brightly', 'nervously', 'fly'} >>> >>> import nltk >>> fd = nltk.FreqDist(re.findall(r'\b\w+ly\b', raw)) >>> fd FreqDist({'only': 84, 'really': 27, 'suddenly': 20, 'gently': 14, 'lily': 13, 'exactly': 12, 'hardly': 11, 'Only': 10, 'nearly': 9, 'certainly': 9, ...}) >>> fd.plot() >>> fd.plot(30) >>>