code: def phrases_map(data):
    
    (entry, text_fn) = data
    text = text_fn()
    filename = entry.filename
  
    logging.debug("Got %s", filename)
    for s in split_into_sentences(text):
      words = split_into_words(s.lower())
      if len(words) < PHRASE_LENGTH:
        yield (":".join(words), filename)
        continue
      for i in range(0, len(words) - PHRASE_LENGTH):
        yield (":".join(words[i:i+PHRASE_LENGTH]), filename)
docs: Phrases demo map function.