def ieerstr2tree(s, chunk_types=[u'LOCATION', u'ORGANIZATION', u'PERSON', u'DURATION', u'DATE', u'CARDINAL', u'PERCENT', u'MONEY', u'MEASURE'], root_label=u'S'):
 m = _IEER_DOC_RE.match(s)
 if m:
  return {u'text': _ieer_read_text(m.group(u'text'), root_label), u'docno': m.group(u'docno'), u'doctype': m.group(u'doctype'), u'date_time': m.group(u'date_time'), u'headline': _ieer_read_text(m.group(u'headline'), root_label)}
 else:
  return _ieer_read_text(s, root_label)

def ieerstr2tree ( s , chunk_types = [ u'LOCATION' , u'ORGANIZATION' , u'PERSON' , u'DURATION' , u'DATE' , u'CARDINAL' , u'PERCENT' , u'MONEY' , u'MEASURE' ] , root_label = u'S' ) : m = _IEER_DOC_RE . match ( s ) if m : return { u'text' : _ieer_read_text ( m . group ( u'text' ) , root_label ) , u'docno' : m . group ( u'docno' ) , u'doctype' : m . group ( u'doctype' ) , u'date_time' : m . group ( u'date_time' ) , u'headline' : _ieer_read_text ( m . group ( u'headline' ) , root_label ) } else : return _ieer_read_text ( s , root_label )
return a chunk structure containing the chunked tagged text that is encoded in the given ieer style string .