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

后端 未结 5 1093
鱼传尺愫
鱼传尺愫 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:56

    If your using python 3 try:

    fdist1.most_common(200)
    

    instead, to get the 200 most frequent words.

提交回复
热议问题