def fileEnd(self): """Closes the output file.""" if self._sent.num_train > 0: sys.stderr.write("Written {0} sentences out of {1}, with avg length = {2} for file {3}.\n".format( self._sent.num_train, self._sent.num_sentences, float(self._sent.num_words) / self._sent.num_train, self.cc_file)) self._sent.clear_statistics() DefaultConllCallback.fileEnd(self) self._out.close() self._out = None
def fileEnd(self): """Closes the output file.""" DefaultConllCallback.fileEnd(self) self._out.close() self._out = None