#NEWLINE# def __init__( self , input_stream , record_marker = 'ref' , record_level_markers = [ 'ref' , 'id' , 'dt' , 'ELANBegin' , 'ELANEnd' , 'ELANParticipant' ] , utterance_level_markers = [ 'rf' , 'rt' , 'np' , 'graid' , 'pr' ] , mapper = None ) : #NEWLINE# #INDENT# "Class's constructor.\n\n        Parameters\n        ----------\n        input_stream : str or IO stream\n            Path of the Toolbox TXT file.\n        record_marker : str\n            The marker that marks the start of a Toolbox record in the input\n            file.\n\n        " #NEWLINE# self . _input_stream = None #NEWLINE# self . tier_hierarchy = None #NEWLINE# self . input_stream = input_stream #NEWLINE# self . record_marker = record_marker #NEWLINE# if ( mapper is None ) : #NEWLINE# #INDENT# self . _tier_labels = tier_mapping ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _tier_labels = mapper #NEWLINE# #UNINDENT# self . record_level_markers = record_level_markers #NEWLINE# self . utterance_level_markers = [ ] #NEWLINE# self . utterance_level_markers . extend ( utterance_level_markers ) #NEWLINE# self . utterance_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_TRANSLATION ) ) #NEWLINE# self . utterance_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_COMMENT ) ) #NEWLINE# self . word_level_markers = [ ] #NEWLINE# self . word_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_WORD ) ) #NEWLINE# self . morpheme_level_markers = [ ] #NEWLINE# self . morpheme_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_MORPHEME ) ) #NEWLINE# self . tag_level_markers = [ ] #NEWLINE# self . tag_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_GLOSS ) ) #NEWLINE# self . tag_level_markers . extend ( self . _tier_labels . tier_labels ( poioapi . data . TIER_POS ) ) #NEWLINE# self . parse ( )