title: Python NLTK parsing error? 'str' object has no attribute 'check_coverage'
body: <p>I am trying to use NLTK to determine if a sentence is valid.
  i loaded the grammar, but whenever I try to get the parser it does not work and I get the error "AttributeError: 'str' object has no attribute 'check_coverage'"
  This is my code:</p>
  
  <pre><code>sentence = ['show', 'me', 'northwest', 'flights', 'to', 'detroit', '.']
  grammar = nltk.data.load('grammars/large_grammars/atis.cfg', 'text')
  parser =  nltk.parse.BottomUpChartParser(grammar)
  chart = parser.chart_parse(sentence)
  </code></pre>
  
  <p>Here is the full traceback:
      Traceback (most recent call last):</p>
  
  <pre><code> File "&lt;ipython-input-448-852d3bb24984&gt;", line 1, in &lt;module&gt;
   chart = parser.chart_parse(sentence)
  
   File "C:\Users\Class2016\Anaconda3\lib\site-packages\nltk\parse\chart.py", 
   line 1310, in chart_parse
    self._grammar.check_coverage(tokens)
  
  AttributeError: 'str' object has no attribute 'check_coverage'
  </code></pre>
  
  <p>I got this part of code from the example listed here under Unit tests for LARGE context-free grammars: <a href="http://www.nltk.org/howto/parse.html" rel="nofollow noreferrer">http://www.nltk.org/howto/parse.html</a></p>
  
  <p>Any information on why this is happening or how to correct this would be greatly appreciated.</p>
  
  <p>Thanks!</p>