#NEWLINE# def run_everything( self , document ) : #NEWLINE# #INDENT# analysis = StanfordAnalysis ( self . corenlp . analyse ( document . text ) ) #NEWLINE# tokens = analysis . get_tokens ( ) #NEWLINE# offsets = analysis . get_token_offsets ( ) #NEWLINE# document . set_tokenization_result ( list ( zip ( offsets , coref ) ) ) #NEWLINE# document . set_lemmatization_result ( analysis . get_lemmas ( ) ) #NEWLINE# document . set_sentencer_result ( analysis . get_sentence_boundaries ( ) ) #NEWLINE# document . set_tagging_result ( analysis . get_pos ( ) ) #NEWLINE# document . set_syntactic_parsing_result ( analysis . get_parse_trees ( ) ) #NEWLINE# found_entities = analysis . get_found_entities ( document . human_identifier , self . gazette_manager ) #NEWLINE# document . set_ner_result ( found_entities ) #NEWLINE# document . save ( ) #NEWLINE# for coref in analysis . get_coreferences ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# apply_coreferences ( document , coref ) #NEWLINE# #UNINDENT# except CoreferenceError as e : #NEWLINE# #INDENT# logger . warning ( e )