title: What does `features['contains(%s)' % word.lower()] = True` mean in NLTK?
body: <p>I've been reading nltk document recently.And I don't understand the following code.</p>
  
  <pre><code>def dialogue_act_features(post):
      features = {}
      for word in nltk.word_tokenize(post):
          features['contains(%s)' % word.lower()] = True
      return features
  </code></pre>
  
  <p>This is a feature extractor for NaiveBayesClassifier,but what does</p>
  
  <p><code>features['contains(%s)' % word.lower()] = True</code> </p>
  
  <p>mean? </p>
  
  <p>I think this line of code is a way to generate a dict,but I have no idea how it works.</p>
  
  <p>Thanks</p>