GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — nlp_preprocessing/line_separator.py at master · YoungKwonJo/nlp_preprocessing Expand file tree/ Copy pathline_separator.pyMore file actions executable file ·13 lines (10 loc) · 393 Bytes / Copy pathline_separator.pyFile metadata and controlsexecutable file ·13 lines (10 loc) · 393 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 import sys, fileinput, re from nltk.tokenize import sent_tokenize if __name__ == "__main__": for line in fileinput.input(): if line.strip() != "": line = re.sub(r'([a-z])\.([A-Z])', r'\1. \2', line.strip()) sentences = sent_tokenize(line.strip()) for s in sentences: if s != "": sys.stdout.write(s + "\n") |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |