Mercurial > hg > TextShaper
diff textshaper/split.py @ 48:03ce88daa98d
start test
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sat, 16 May 2015 19:07:38 -0700 |
parents | 7e63ca061b6c |
children | 1284c99a94fa |
line wrap: on
line diff
--- a/textshaper/split.py Sat May 16 19:02:03 2015 -0700 +++ b/textshaper/split.py Sat May 16 19:07:38 2015 -0700 @@ -45,13 +45,13 @@ # preprocess text text = options.file.read().strip() text = ' '.join(text.split()) -# paragraphs = split_paragraphs(text) + # paragraphs = split_paragraphs(text) - ends = '.?!' + ends = '.?!' - for end in ends: -# for paragraph in paragraphs: -# print (paragraph) + # find all ending punctuation + indices = {end: findall(text, end) for end in ends} + if __name__ == '__main__': main()