# -*- coding: utf-8 -*-
import q50
import re

inputfile = 'nlp.txt'
pattern = '\s'

def word_split(str):
    word_list = re.split(pattern, str)
    return word_list

def main(file):
    with open(file, 'r') as f:
        for fr in f.readlines():
            if fr == '\n':
                continue
            fr = q50.sentense_split(fr)
            wr = word_split(fr)
            wr.append('\n')
            print '\n'.join(wr)

if __name__ == '__main__':
    main(inputfile)
