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
naldo0193
V2EX  ›  Python

请问有快速和准确的汇总长短文相似文章的方法吗?

  •  
  •   naldo0193 · 2020-06-24 10:39:02 +08:00 · 1600 次点击
    这是一个创建于 1373 天前的主题,其中的信息可能已经有所发展或是发生改变。

    需要汇总改动少于 30%的文章(或者说相似到达 70%不包括标点符号),请问有这样的方法吗?

    5 条回复    2020-06-25 10:31:34 +08:00
    ygtq
        1
    ygtq  
       2020-06-24 12:00:07 +08:00
    google 一些相似度匹配算法,有挺多的。 我用过一个 simhash
    fanfou
        2
    fanfou  
       2020-06-24 14:51:57 +08:00
    是的,有一些文本相似度匹配的库。
    bigboNed3
        3
    bigboNed3  
       2020-06-24 16:25:18 +08:00
    这个感觉最长公共子序列可以啊
    return len(longest_common_subsequence(s)) > 0.7 * len(s)
    v2exblog
        4
    v2exblog  
       2020-06-24 17:56:53 +08:00
    结巴分词,集合交集,取百分数
    lithbitren
        5
    lithbitren  
       2020-06-25 10:31:34 +08:00
    最长公共子序列要用的话,得回溯除出所有连续的公共序列,过滤掉重复几个字或十几个字的,然后再加总求百分比,直接求只能求出最长的那个长度,多个短公共序列是不能直接得出的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1383 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:40 · PVG 07:40 · LAX 16:40 · JFK 19:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.