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文本分析
通过单词嵌入探索语义关系
323
我们使用了
Gensim
来训练、存储和分析我们的嵌入。
Gensim
非常受欢迎,但你
也可以尝试其他更快的方法,比如(
Py
Magnitude
https://oreil.ly/UlRzX
)或
finalfusion
https://oreil.ly/TwM4h
)。当然,你也可以使用
TensorFlow
PyTorch
训练不同种类的嵌入。
如今,语义嵌入是所有复杂的机器学习任务的关键。然而,对于情感分析或段落检
测之类的任务,你不需要单词嵌入,你需要的是句子或整个文档的嵌入。关于创建
文档嵌入,已经发表了很多不同的方法(
Wolf
2018
年;
Palachy
2019
年)。一
种常见的方法是计算句子中单词向量的平均值。一些
spaCy
模型的词汇表中包含单
词向量(
https://oreil.ly/zI1wm
),而且允许你利用现成的平均单词向量来计算文档
相似度。但是,平均单词向量仅适用单个句子或非常短的文档。此外,该方法受限
于词袋模型,无法考虑单词的顺序。
最新的模型同时利用了语义嵌入与词序的功能。在下一章中,我们将使用这种模型
处理情感分类。
10.7
补充阅读
Bolukbasi
Tolga
Kai-Wei Chang
James Zou
Venkatesh Saligrama
Adam
Kalai.
Man Is to Computer Programmer as Woman Is to Homemaker? Debiasing
Word Embeddings ...
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
构建知识图谱

构建知识图谱

Jesus Barrasa, Jim Webber
写给系统管理员的Python脚本编程指南

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

Posts & Telecom Press, Ganesh Sanjiv Naik

Publisher Resources

ISBN: 9787519864446