Scribd processes document text as an iterable of complete text chunks. Implement a function that returns the k most frequent words without concatenating the entire stream into one string.
Words are case-insensitive and consist of alphanumeric characters, with an optional internal apostrophe, such as don't. Ignore punctuation and other separators. If two words have the same frequency, sort the lexicographically smaller word first. Return fewer than k words when the stream contains fewer unique words.
documents, an iterable of strings where each string is an independent document or text chunk, and integer k.k strings ordered by descending frequency, then ascending lexicographic order.def top_k_words(documents, k):