首页/文章/ 详情

PyTextRank---文本关键字(keywords)的自动取出

1年前浏览597

1 引言

从文本中抽取出关键字是自然语言处理NLP的一个重要应用领域。在《文本摘要生成的确定过程和随机过程》中曾经讨论过两种摘要的产生方法。不幸的是, Gensim从4.0版本开始,移除了summarization模块(目前的安装版本是V4.0.1),因此不能再使用gensim产生摘要和关键字。作为一种代替,我们使用PyTextRank库来取出关键字。 

2 PyTextRank简介 

PyTextRank是TextRank的一个Python实现,而TextRank是一种基于图的关键词和句子的提取算法, 它类似于谷歌的页面排名算法。作为spaCy管道的扩展,用于基于图的自然语言处理以及相关知识图谱实践以及文本提取短语和简要总结。PyTextRank目前安装的版本是V3.1.1. 这个库的主要用途包括:短语提取---即关键字提取, 从文本文件中获取排名靠前的短语; 对文本文件进行低成本的提取总结, 即产生摘要; 帮助从非结构化的文本中推断出概念,使之成为更多的结构化表述, 即生成有意义的核心句子.

3 提取关键字

下面的例子显示如何使用PyTextRank从一段文本中提取关键字. 这段文本取自Mandalawi M.A.等人(2019)的论文摘要. 该论文的题目是: Modelling and Analyses of Rock Bridge Fracture and Step-Path Failure in Open-Pit Mine Rock Slope(露天矿边坡岩桥断裂和阶梯状破坏的模拟与分析). 在原始的论文中, 作者给出的关键字有: Rock bridges, Rock slope stability, Tensile cracks, Shear cracks.  

按照排名顺序, 使用程序抽出的关键字结果如下, 在这里略去了字符长度小于14的关键字: 

intact rock bridges

pre-existing discontinuities

different pre-existing discontinuities

steeper dip angles

slope stability

Proposed slope models

crack initiation

less steep rock bridge angles

instability mode

Tensile fracture

neighboring structures

the rock bridge angle

Larger structures

the intact rock bridges

the intact rock fracturing hypothesis

Step-path failure

step-path failure

man-made and natural rock slopes

consequently reduced slope instability

Major joint plane spacing

Rock Bridge Fracture

shear and tensile failure

two selected slope simulations

the rock masses

the slope surface

relative deformations

Open-Pit Mine Rock Slope

explicit large-scale structures

the Handlebar Hill open - pit mine

the extension cracks

the propagation

much higher potential

the progressively cracks development

four joint-net distributions

The continuum finite element method

these fractures

The empirical models

这些抽取的关键字可以作为连接其它文档的基础.

来源:计算岩土力学
断裂
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2022-11-19
最近编辑:1年前
计算岩土力学
传播岩土工程教育理念、工程分析...
获赞 127粉丝 907文章 1776课程 0
点赞
收藏
未登录
还没有评论

课程
培训
服务
行家

VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈