Created
April 24, 2020 21:28
-
-
Save nbroad1881/163ffa24f0bef7c7586ffc2e17480e07 to your computer and use it in GitHub Desktop.
If there is a massive corpus in a single file, this will break it up by number of lines. Also gets list of filenames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !split -l 250000 text_file.txt smaller_ | |
| ### split [options] filename prefix | |
| ### -l linenumber | |
| ### -b bytes | |
| import glob | |
| file_list = glob.glob("smaller_*") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment