#NEWLINE# def getChunkSequence( tree ) : #NEWLINE# #INDENT# sequence = '' #NEWLINE# for i in range ( 0 , len ( tree ) ) : #NEWLINE# #INDENT# if ( type ( tree [ i ] ) == nltk . tree . Tree ) : #NEWLINE# #INDENT# sequence += i [ i ] . node #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sequence += tree [ i ] [ 1 ] #NEWLINE# #UNINDENT# #UNINDENT# return sequence