read_text

fairseq2.data.text.read_text(pathname, encoding=None, line_ending=LineEnding.INFER, ltrim=False, rtrim=False, skip_empty=False, memory_map=False, block_size=None)[source]

Open a text file and return a data pipeline reading lines one by one.

Return type:

DataPipelineBuilder