title: defaultdict with tuple as the key, how to set default value in the event key isn't found
body: <p>Let's say I have a <code>defaultdict</code> in the following form:</p>
  
  <pre><code>theta = defaultdict(float)
  </code></pre>
  
  <p>The key consists of a tuple of strings i.e. <code>(label, word)</code>, and the associated value is the probability that the given word fits the given label (part of speech tagging).</p>
  
  <p>For example, the word 'stand' could be a noun or a verb. So I could do something like:</p>
  
  <pre><code>theta[('NOUN', 'stand')] = 0.4
  theta[('VERB', 'stand')] = 0.6
  theta[('ADJ', 'stand')] = 0.0
  </code></pre>
  
  <p>and so on for the remaining parts of speech labels.</p>
  
  <p>What I need to do is have the dictionary return a value of 1 by default if it is invoked with a word that it does not contain and the associated label is 'NOUN', and return 0 for all other associated labels.  For example:</p>
  
  <pre><code>value = theta[('NOUN', 'wordthatdoesntexist')]  # this should be 1
  value = theta[('VERB', 'wordthatdoesntexist')]  # this should be 0
  </code></pre>
  
  <p>How can I do this? Can I do it in the initialization step, using lambda? Or is there some other way?</p>