V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
xoxo419
V2EX  ›  程序员

有这样的爬虫么, 可以爬英文的文档中的单词并统计每个单词在文档出现的次数?

  •  
  •   xoxo419 · Jun 20, 2018 · 4845 views
    This topic created in 2880 days ago, the information mentioned may be changed or developed.
    18 replies    2018-06-20 17:10:37 +08:00
    ChangQin
        1
    ChangQin  
       Jun 20, 2018
    有,go 程序设计语言前几节就有这个 demo
    jiezhi
        2
    jiezhi  
       Jun 20, 2018
    python 入门里也有这个 demo 吧
    xy2401
        3
    xy2401  
       Jun 20, 2018
    mark。我之前想统计 比如 spring 文档里面 的高频词汇,感觉需求类似
    yuanfnadi
        4
    yuanfnadi  
       Jun 20, 2018 via iPhone
    Java 入门时候写过类似 demo
    lhx2008
        5
    lhx2008  
       Jun 20, 2018 via Android
    读进来切一下,python 可以用 counter,java 可以用 stream
    NaVient
        6
    NaVient  
       Jun 20, 2018
    python --> from collections import Counter
    qilishasha
        7
    qilishasha  
       Jun 20, 2018
    数组长度数组长度
    kingname
        8
    kingname  
       Jun 20, 2018
    laoyuan
        9
    laoyuan  
       Jun 20, 2018
    手写原生
    simapple
        10
    simapple  
       Jun 20, 2018
    nltk
    soho176
        11
    soho176  
       Jun 20, 2018
    是准备统计最近十年高考英语卷,出现频率高的单词吗?
    fengche361
        12
    fengche361  
       Jun 20, 2018
    爬取+分词+wordcount ?
    yuriko
        13
    yuriko  
       Jun 20, 2018
    第一反应是 MapReduce 的范例……
    hyi
        14
    hyi  
       Jun 20, 2018
    学 python 时写过一个统计英文 txt 单词词频的 python 小脚本,用的是 nltk 库,你可以参考下思路,https://github.com/Hangyi/parse_words_frequency
    jyf
        15
    jyf  
       Jun 20, 2018
    主流的爬虫一般都会统计词频 因为有个流行的算法 TF-IDF 就是拿词频作为计算基础的
    woscaizi
        16
    woscaizi  
       Jun 20, 2018
    写过一个类似的东西,是统计小说中 2 到 5 字的词语出现的次数,没有考虑是否是有意义的词的情况
    https://github.com/pandaTED/zhihuSpider/blob/master/src/main/java/cn/panda/hello/Hello.java
    Tink
        17
    Tink  
    PRO
       Jun 20, 2018 via iPhone
    这点功能不如手写
    geying
        18
    geying  
       Jun 20, 2018
    @yuriko +1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   908 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 21:51 · PVG 05:51 · LAX 14:51 · JFK 17:51
    ♥ Do have faith in what you're doing.