#NEWLINE# def write_parameter_file( self , file_name , params ) : #NEWLINE# #INDENT# 'Write learned or estimated parameters to a file' #NEWLINE# with self . _open_text_file_write ( self ) as file_obj : #NEWLINE# #INDENT# d = datetime . datetime . now ( ) . replace ( microsecond = 0 ) #NEWLINE# file_obj . write ( '# Parameters for Morfessor {}, {}\n' . format ( self . _version , d ) ) #NEWLINE# for ( key , val ) in params . items ( ) : #NEWLINE# #INDENT# file_obj . write ( '{}:\t{}\n' . format ( key , val ) )