diff options
author | Hannah <hannah_chow@brown.edu> | 2020-02-11 06:34:19 -0500 |
---|---|---|
committer | Hannah <hannah_chow@brown.edu> | 2020-02-11 06:34:19 -0500 |
commit | b60154479add51f826afaeff074cf43a6b416831 (patch) | |
tree | 723f7f1356b1c3dcf5c409347b125d5a577b538f /sentence_parser.py | |
parent | 74ca8ac01e32faa8adab54ddfd806fe46cda03ec (diff) | |
parent | dc6453e27375a1b3d614a74b7fd1d83695f130d7 (diff) |
merge
Diffstat (limited to 'sentence_parser.py')
-rw-r--r-- | sentence_parser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sentence_parser.py b/sentence_parser.py new file mode 100644 index 000000000..a07b25f6d --- /dev/null +++ b/sentence_parser.py @@ -0,0 +1,7 @@ +def parse_text(file_path): + with open(file_path, encoding='utf8',mode='r+') as f: + lines = f.readlines() + print(len(lines)) + print(lines[1][1]) + +parse_text("eng_news-typical_2016_10K-sentences.txt")
\ No newline at end of file |