NLTK python error: “TypeError: 'dict_keys' object is not subscriptable”

后端 未结 5 1099
鱼传尺愫
鱼传尺愫 2020-12-01 03:36

I am following instructions for a class homework assignment and I am supposed to look up the top 200 most frequently used words in a text file.

Here\'s the last par

5条回答
  •  心在旅途
    2020-12-01 03:59

    To print the most frequently used 200 words use: fdist1.most_common(200) The above line of code will return the 200 most frequently used words as key-frequency pair.

提交回复
热议问题