title: counting tokens and types + dictionaries
body: <p>Can someone help me with this one and explain how to properly tokenize, count and loop? Got such task to do:</p>
  <ol>
  <li>Create a new empty dictionary <code>dic = {}</code></li>
  <li>Loop through the tokens included in <code>text1</code> and count the raw frequencies of their occurrence in that list. The 'raw frequency' of 'to' in 'to be or not to be' is 2. Finally, when you have gone through all of the tokens…</li>
  <li>Print the set of case-sensitive unique tokens (ie types) with their respective frequencies in the format: <code>COUNTER UNIQUE_TOKEN FREQUENCY NEWLINE</code> – sorted by the frequency of the unique token</li>
  <li>LRepeat steps for case insensitive unique tokens</li>
  </ol>
  <p>*Text1 is from nltkbook</p>
  <p>So far got this but weird stuff is going on and I totally don't understand what I've done :(</p>
  <pre><code>    import nltk
      from nltk.book import *
      print(len(set(text1)))
      counter = 0
         for token in text1:
         counter += 1
      print(counter)
  </code></pre>
  <p>Will be very grateful for any help, clues, piece of advice.</p>