自然语言9_NLTK计算中文高频词

sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频教程)

https://study.163.com/course/introduction.htm?courseId=1005269003&utm_campaign=commission&utm_source=cp-400000000398149&utm_medium=share

 

以下代码仅限于python2

 

NLTK计算中文高频词

  1. >>> sinica_fd=nltk.FreqDist(sinica_treebank.words())
  2. >>> top100=sinica_fd.items()[0:100]
  3. >>> for (x,y) in top100:
  4. print x,y

 

 

 

 

  1.  
  2.  6776
  3.  1482
  4.  1331
  5.  1317
  6.  1190
  7.  759
  8.  724
  9.  688
  10.  627
  11.  612
  12.  580
  13.  542
  14.  526
  15.  467
  16.  417
  17.  404
  18.  389
  19. 我們 384

python风控评分卡建模和风控常识

https://study.163.com/course/introduction.htm?courseId=1005214003&utm_campaign=commission&utm_source=cp-400000000398149&utm_medium=share

转载于:https://www.cnblogs.com/webRobot/p/6068858.html

你可能感兴趣的:(python,人工智能)