A text is a coherent body of sentences. Coherent means they are linked by a consistent "theme". The text ends when "completion" is signalled. For example, when a problem introduced at the start is solved, or when a promised discussion has reached a conclusion. 