def apply(self, doc):
if not isinstance(doc, Document):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>for sentence in doc.sentences:<EOL><INDENT>yield TemporarySpanMention(<EOL>char_start=<NUM_LIT:0>, char_end=len(sentence.text) - <NUM_LIT:1>, sentence=sentence<EOL>)<EOL><DEDENT>
Generate MentionSentences from a Document by parsing all of its Sentences.

:param doc: The ``Document`` to parse.
:type doc: ``Document``
:raises TypeError: If the input doc is not of type ``Document``.