Composes words from partial word matches in a string