How to create a table to display relative frequencies of selected words (eg. with, can, will) from any text corpus in nltk package in python
Finding frequency of words for the Gutenberg Corpus. You need to just put Gutenberg text files as input.

cfd = nltk.ConditionalFreqDist(
    (fileids, word)
    for fileids in gutenberg.fileids()
    for word in gutenberg.words(fileids))
modals = ['with', 'can', 'will']
cfd.tabulate(fileids, samples=modals)


Output :
                        with  can will 
        austen-emma.txt 1187  270  559 
  austen-persuasion.txt  643  100  162 
       austen-sense.txt  971  206  354 
          bible-kjv.txt 5961  213 3807 
        blake-poems.txt   59   20    3 
     bryant-stories.txt  276   75  144 
burgess-busterbrown.txt   59   23   19 
      carroll-alice.txt  175   57   24 
    chesterton-ball.txt  799  131  198 
   chesterton-brown.txt  726  126  111 
chesterton-thursday.txt  544  117  109 
  edgeworth-parents.txt 1304  340  517 
 melville-moby_dick.txt 1659  220  379 
    milton-paradise.txt  876  107  161 
 shakespeare-caesar.txt  131   16  129 
 shakespeare-hamlet.txt  212   33  131 
shakespeare-macbeth.txt  134   21   62 
     whitman-leaves.txt 1111   88  261 

Hope This answers your question :)