Loading
Before embedding a document you split it into chunks. Write `chunk(words, size, overlap)` that takes a list of words and returns a list of chunks (each a list of words). Each chunk has at most `size` words and starts `size - overlap` words after the previous one. Stop once a chunk reaches the end.
Step through start positions 0, size-overlap, 2*(size-overlap)... Take words[start:start+size] and stop when start+size >= len(words).