title: Why Parse Tree is not generated in my code for my sentences?
body: <p>I am trying to create a context free grammar for general english sentences using python 3.7 and different nltk libraries. The code runs successfully, without any error for all the sentences.  But the tree isn't generated for all the sentences.
  For example:<br>
  In following case:  </p>
  
  <pre class="lang-none prettyprint-override"><code>q1 = "I shot an elephant in my pajamas"  
  q2 = "Big Data is huge unstructured type of data"  
  </code></pre>
  
  <p>Parse tree is generated for q1 and not for q2. And I don't understand why!  </p>
  
  <pre class="lang-python prettyprint-override"><code>st1="""
  S -&gt; NP VP
  NP -&gt; NNP|Det N|Det N PP
  NN -&gt; JJ NN|N
  VP -&gt; V JJ|V  NP|V S|V NP PP
  PP -&gt; P NP
  """+NNP+"\n"+Det+"\n"+N+"\n"+JJ+"\n"+V+"\n"+P
  
  grammar1 = nltk.CFG.fromstring(st1)
  sent = q1.split()
  rd_parser = nltk.RecursiveDescentParser(grammar1)
  for tree in rd_parser.parse(sent):
      print(tree)
  
  print(st1)
  print(grammar1)
  </code></pre>
  
  <p>Following is an output for q1. And same kind of parse tree needs to be generated for q2.</p>
  
  <pre class="lang-none prettyprint-override"><code>(S
    (NP (Det ) (N I))
    (VP
      (V shot)
      (NP (Det an) (N elephant) (PP (P in) (NP (Det my) (N pajamas))))))
  (S
    (NP (Det ) (N I))
    (VP
      (V shot)
      (NP (Det an) (N elephant))
      (PP (P in) (NP (Det my) (N pajamas)))))
  </code></pre>
  
  <p>You can see complete code <a href="https://drive.google.com/file/d/1cfrpMR_tfVOE2IOpZ6Il4-qsizV0pirc/view?usp=sharing" rel="nofollow noreferrer">here</a></p>