added flatten option to pipeline

previously outputed lists of sentences, which contained lists of words
adding `flatten=True` will now return a list of words (not separated by
sentence)