Skip to Content
Python文本分析
book

Python文本分析

by Jens Albrecht, Sidharth Ramachandran, Christian Winkler
August 2022
Intermediate to advanced
441 pages
11h 26m
Chinese
China Electric Power Press Ltd.
Content preview from Python文本分析
274
|
第
9
章
important parts of the company to other buyers,...
officials and analysts have said.
在这种方法中,我们使用
TF-IDF
值创建了文本的中间表示,并根据这个表示给各
个句子打分,最后挑选出分数最高的三个句子。使用这种方法选择的句子与前面
我们手工书写的相吻合,抓住了文章的要点。虽然有一些细微的差别,比如高通
(
Qualcomm
)在该产业中的重要性,以及
5G
科技的具体应用等内容都丢失了,但
是这种方法可以作为一种良好的解决方案,快速识别新闻文章中的重要句子,并自
动生成摘要。最后,我们提一下本书附带的
notebook
中定义的
tfidf_summary
函数,
本章后面会用到它。
9.3.2 LSA
算法
潜在语义分析(
Latent Semantic Analysis
,简称
LSA
)是提取式摘要中常用的现代
算法之一。
LSA
是一种通用的方法,可用于主题建模、文档相似性分析以及其他任
务。
LSA
假定意思相近的单词会出现在同一个文档内。在
LSA
算法中,我们首先
以句子词条矩阵的形式表示整个文章。文档词条矩阵的概念已经在第
8
章中介绍过
了,我们改变一下这个概念,变成句子词条矩阵。每一行表示一个句子,而每一列
表示一个单词。该矩阵中每个元素的值是词频,通常会按照
TF-IDF
权重调整比例。
这种方法的目标是通过创建改版的句子词条矩阵表示,将所有单词删减到几个主题。
为了创建改版表示,我们需要应用非负矩阵分解方法,将这个矩阵表示成两个分解 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精益AI

精益AI

Lomit Patel
写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik

Publisher Resources

ISBN: 9787519864446