#NEWLINE# def test_ngram_stream_raises_error_on_batch_stream( ) : #NEWLINE# #INDENT# sentences = [ list ( numpy . random . randint ( 10 , size = stream ) ) for sentence_length in [ 3 , 5 , 7 ] ] #NEWLINE# stream = DataStream ( IndexableDataset ( sentences ) , iteration_scheme = SequentialScheme ( 3 , 1 ) ) #NEWLINE# assert_raises ( ValueError , NGrams , 4 , stream )