from textwrap import wrap

def getAbstract(text, lines=5, screenwidth=100):
    width = len(' '.join([line for block in text.splitlines() for line in
        wrap(block, width=screenwidth)][:lines]))
Computing article abstracts