def sgml_extract(text_data):
 return {'docid': _get_one(docid_re, text_data, required=True), 'doctype': _get_one(doctype_re, text_data, required=True), 'datetime': _get_one(datetime_re, text_data, required=True), 'headline': _get_one(headline_re, text_data, required=True), 'poster': _get_one(poster_re, _get_one(post_re, text_data)), 'postdate': _get_one(postdate_re, _get_one(post_re, text_data)), 'text': _get_text(_get_one(post_re, text_data)).strip()}

def sgml_extract ( text_data ) : return { 'docid' : _get_one ( docid_re , text_data , required = True ) , 'doctype' : _get_one ( doctype_re , text_data , required = True ) , 'datetime' : _get_one ( datetime_re , text_data , required = True ) , 'headline' : _get_one ( headline_re , text_data , required = True ) , 'poster' : _get_one ( poster_re , _get_one ( post_re , text_data ) ) , 'postdate' : _get_one ( postdate_re , _get_one ( post_re , text_data ) ) , 'text' : _get_text ( _get_one ( post_re , text_data ) ) . strip ( ) }
extract text from the ontonotes web documents .