def shorten(s, max_len=<NUM_LIT:16>):
short = s<EOL>words = [abbreviate(word) for word in get_words(s)]<EOL>for i in range(len(words), <NUM_LIT:0>, -<NUM_LIT:1>):<EOL><INDENT>short = '<STR_LIT:U+0020>'.join(words[:i])<EOL>if len(short) <= max_len:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return short[:max_len]<EOL>
Attempt to shorten a phrase by deleting words at the end of the phrase

    >>> shorten('Hello World!')
    'Hello World'
    >>> shorten("Hello World! I'll talk your ear off!", 15)
    'Hello World'