How to convert a set in to a dictionary with set elements as key while assigning an index to each of them

后端 未结 0 1472
不知归路
不知归路 2021-01-24 03:53

This is a preprocessing pipeline for NLP data for word prediction.

def set_of_words_in(sequences):
  set_of_words={sublst for lst in sequences for sublst in lst}
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题