hus787

ex49:making sentences

Feb 18th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1.     a=Making_sentences.Sentence(('noun','princess'),('verb','go'), ('noun','bear'))
  2.     b=lexicon.scan("princess go to bear")
  3.     d = b
  4.     print b
  5.     c=Making_sentences.parse_sentence(d)
  6.     print b
  7.     assert_equal(b[0][1],c.subject)
  8.  
  9. i get this:
  10.  
  11.     assert_equal(b[0][1],c.subject)
  12. IndexError: list index out of range
  13. -------------------- >> begin captured stdout << ---------------------
  14. [('noun', 'princess'), ('verb', 'go'), ('stop', 'to'), ('noun', 'bear')]
  15. []
  16.  
  17. --------------------- >> end captured stdout << ----------------------
  18.  
  19. ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment