zoukankan      html  css  js  c++  java
  • 综合练习:词频统计

    fo = open("new.txt","r")
    srt=fo.read()
    fo.close()
    #替换分割符
    sep = """,."?!:()"""
    for i in sep:
        srt = srt.replace(i, " ")
    #转换为小写并转化为单词列表
    wordList = srt.lower().split()
    #转换为字典
    wordDict = {}
    for i in wordList:
        wordDict[i] = wordDict.get(i, 0)+1
    #删除不参与统计的词
    sep=["the","for","to","of","a","in","with","on","and","that","an"]
    for i in sep:
        wordDict.pop(i)
    #排序
    wordList = sorted(wordDict.items(), key=lambda X: X[1], reverse=True)
    for i in range(20):
        print(wordList[i])
    As internet technologies have been increasingly applied in the cultural field, vigorous growth in recent years has marked China's cultural programs and industries.
    In this year's government work report, Premier Li Keqiang frequently referred to internet-related concepts, like Internet Plus, artificial intelligence, and Digital China, and noted that the Chinese government will give priority to "providing more and better online content".
    During the two sessions, many NPC deputies and CPPCC members showed great concern over the problems facing the internet culture industry and weighed in with suggestions.
    Pony Ma Huateng, chairman and CEO of Chinese social media and gaming titan Tencent Holdings Ltd, and an NPC deputy, brought eight suggestions to the top legislature, including using the Internet Plus strategy to build the country into a Digital China and an Internet Power based on the integration of digital technologies and culture. He also pointed out the importance of creating cultural IPs (intellectual properties) with Chinese characteristics and promoting the coordinated development of cultural industries with other social sectors.
    Promoting traditional fine culture on the internet was another key issue discussed during the two sessions. Gong Hanlin, a famous comedian and a CPPCC member, said that although our literature and arts have kept thriving, it's not hard to find live streaming programs and micro videos fraught with dross, which pose a great hazard to younger people. Gong argued that we need to crack down on vulgar productions and kitsch in cyber space and promote fine traditional Chinese culture, on which the country's young country can thrive.
    Ding Lei, CEO of NetEase Inc and a CPPCC member, noted quality online content is still inadequate. To produce and popularize more quality digital cultural content, the communication capabilities of the internet companies can be capitalized on if they are closely integrated with content production organizations, according to the CPPCC member.
    Ding also said it's necessary to further construct a public cultural service system led by the government with the participation of social forces, and that the digitalization of books should be high on the agenda. He argued that with more books carrying fine traditional Chinese culture digitalized and a special online lending system established, quality cultural content can be accessible to the wider public.
    Recent years also have witnessed the online gaming and live-streaming industries take off with ever-expanding markets. Statistics show that with annual revenues up to 203.61 billion yuan in 2017, China's game industry topped the world gaming market.
    However, the extensive development of the online gaming industry has caused many problems, especially violence and sexual elements in the games targeted at teenagers. Therefore, NPC deputy Li Xiuxiang, offered suggestions on building a clear cyber space, including introducing an effective real-name system and an anti-addiction system for those underage, further developing the review mechanism of game content, and establishing an industry self-discipline system.
    NPC deputy Chen Naike put forward several suggestions in a bid to curb the infringement of copyright and the law on the live streaming platforms. Chen said the government needs to step up efforts to pass laws and regulations to better administrate online interactive live broadcasting, set up a multi-agency supervision mechanism, and strengthen the industry's self-discipline system, as well as encourage public supervision.

  • 相关阅读:
    CentOS中基于不同版本安装重复包的解决方案
    诺讯科技
    SQLMap使用
    python初码
    优秀软件project师必备的7大特性
    3.2 Piecewise Linear Interpolation(站点)
    C#开发Unity游戏教程之游戏对象的属性变量
    java 线程 原子类相关操作演示样例 thinking in java4 文件夹21.3.4
    一键解决ScrollView嵌套ListView仅仅显示一行的问题
    W5500中断寄存器的理解
  • 原文地址:https://www.cnblogs.com/hehe2333/p/8649587.html
Copyright © 2011-2022 走看看