V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Devin36
V2EX  ›  Python

一个英语单词词频统计的问题,请帮忙看下

  •  
  •   Devin36 · 2018-08-06 18:44:16 +08:00 · 1845 次点击
    这是一个创建于 2090 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我不会编程,但是最近在准备考试,想要统计下这个词频,遇到的问题是:单词的原形和单词的变形怎么统一统计成单词原形,有个哥们在知乎上写了代码,但不懂,运行起来出了问题,代码链接在这里,https://github.com/Enaunimes/freeq,知乎原问题链接在这里,https://www.zhihu.com/question/20632675/answer/100615805,有哪位哥哥帮我看下啊,谢谢了。
    2 条回复    2018-08-07 19:24:08 +08:00
    mimzy
        1
    mimzy  
       2018-08-06 18:54:59 +08:00
    我猜你可以用 NLTK https://www.nltk.org/ 做词形还原,一个简单的例子: https://pythonprogramming.net/lemmatizing-nltk-tutorial/
    Devin36
        2
    Devin36  
    OP
       2018-08-07 19:24:08 +08:00
    @mimzy 谢谢~,你们英语真好。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2872 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:25 · PVG 11:25 · LAX 20:25 · JFK 23:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.