cerebras.modelzoo.data_preparation.data_preprocessing.data_reader.find_last_paragraph_or_sentence_end#
- cerebras.modelzoo.data_preparation.data_preprocessing.data_reader.find_last_paragraph_or_sentence_end(buffer)[source]#
Find the last end of a paragraph (denoted by ‘
‘) or a sentence in the buffer.
- Args:
buffer (str): The text buffer.
- Returns:
int: The position of the last end of the paragraph or sentence.