Get the value of a defaultdict
<p>I read data from a bunch or emails and count frequency of each word. first construct two counters:</p>

<pre><code>counters.form = collections.defaultdict(dict)
</code></pre>

<p>Get the frequency by</p>

<pre><code>for word in re.findall('[a-zA-Z]\w*', data):
    counters.form[word][file_name] += 1
</code></pre>

<p>For each form, there is a counter that store all the emails which this word appears in, and the frequency of the form in this email. e.g. </p>

<pre><code>form = {'a':   {'email1':4, 'email2':3}, 
        'the': {'email1':2, 'email3':4},
        'or':  {'email1':2, 'email3':1}}
</code></pre>

<p>How to get the frequency of a certain form in a certain email? the frequency of <code>a</code> in <code>email2</code> is 3. </p>
