Code Monkey home page Code Monkey logo

textrankplus's Introduction

TextRankPlus: add more plugins to TextRank algorithm

使用word2vec算法计算单词的空间距离进行关键词提取和单词移动距离(RWMD)算法进行关键句提取,欢迎大家start和代码贡献

NLP

python依赖包介绍

pyltp>=0.1.9.1
           哈工大LTP python软件包,用于分词和词性标注
 networkx>=1.11
           构建单词之间的关系图,计算每个单词的权重
gensim>=1.0.1
           训练word2vec模型
numpy>=1.11.3
           python矩阵和张量计算
pyemd>=0.4.3
           快速计算单词移动距离
python2.7python>=3.5

命令行安装依赖包

pip install -r requirements.txt

下载ltp分词、词性标注模型和与训练的word2vec模型

  1. 从百度云下载ltp_data模型文件 :  http://pan.baidu.com/s/1hsqYX5U
    下载慢可使用Pandownloader
  2. ltp_data文件夹放置到TextRankPlus目录
  3. 下载word2vec模型文件:  http://pan.baidu.com/s/1mhCpm8w
  4. 把下载的3个word2vec模型文件放置到 TextRankPlus/word2vec 目录下

改进的TextRank算法项目的测试

python testTextRankPlus4KeySentence.py
python testTextRankPlus4KeyWord.py

模型生成的词云

词云

todo

  • 基于bilstm+crf的关键词提取
  • python模块松耦合

textrankplus's People

Contributors

zuoxiaolei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.