Python Text Analytics cover

Python Text Analytics

No rating yet
Chapters
9
Series
Data Science and Engineering Technology Series
ISBN
9787111593249

Tags

Summary

Python Text Analytics was written by Indian data scientist Dipanjan Sarkar and translated by Yan Longchuan, Gao Dequan, and Li Junting. China Machine Press introduced and published it in 2018 as part of the "Data Science and Engineering Technology Series." The original title is Text Analytics with Python: A Practical Real-World Approach to Gaining Actionable Insights from Your Data. The book follows a structured "concept-method-code implementation" approach: it first explains the fundamentals of natural language and linguistics, including words, phrases, clauses, syntactic structures, semantic relations, and semantic networks, and introduces how text corpora are annotated and accessed, sketching the overall landscape of natural language processing tasks such as machine translation, speech recognition, question answering, text summarization, and text classification; it then reviews Python syntax, data structures, functional programming features, and common text processing methods to lay the groundwork for later hands-on work. The main body unfolds around the core workflow of text analytics: tokenization and sentence segmentation, text normalization (cleaning, case conversion, stopword removal, stemming, and lemmatization), part-of-speech tagging, and syntactic and structural parsing techniques such as shallow parsing, dependency parsing, and constituency parsing; it then further explains the complete chain of text classification—feature engineering, vectorization methods such as bag-of-words and TF-IDF, classifiers such as Naive Bayes and support vector machines, and model evaluation approaches. The book also covers topics including text summarization, text similarity and clustering, and semantic and sentiment analysis, and uses open-source libraries such as nltk, gensim, scikit-learn, spaCy, and Pattern, together with cases such as news article classification, topic modeling of app and game reviews, movie synopsis clustering, and movie review sentiment analysis, to ground the algorithms in runnable code. The book has seven chapters and about 273 pages, and is suitable as a bridge reading for readers who want to move from beginner to intermediate level in applying natural language processing and machine learning techniques to real-world text data processing.

Editor's review

很多人学文本分析,卡在两头:一边是 NLTK、spaCy 的 API 背了一堆,却说不清分词、词性标注、依存分析背后到底在做什么;另一边是语言学教材里的句法、语义概念学了不少,却不知道怎样写成能跑通的代码。这本书的价值,正在于把这两头接起来。 作者的写法是先讲清“为什么”,再给“怎么做”:自然语言的结构与语义、语料库的标注体系被安排在开篇,后面分词、规范化、词性标注、浅层与依存分析、成分结构分析便有了理论支撑;进入文本分类后,从词袋、TF-IDF 等特征工程讲到朴素贝叶斯与支持向量机,再谈摘要、相似度、聚类和情感分析,流程是连贯的,不是零散技巧的拼盘。 更实用的是案例的“真实感”:新闻文章分类、App 与游戏评论的主题建模、电影概要聚类、影评情感分析,都是有业务含义的任务,读者可以按需替换成自己的数据。配套工具覆盖 nltk、gensim、scikit-learn、spaCy、Pattern,基本是工业与教学中的常见组合。 需要提醒的是,本书出版于 2018 年,代码环境与部分库的 API 已有变动,阅读时宜按当前版本文档调整;深度学习与预训练语言模型不在本书讨论范围内。但就“建立文本分析的完整方法论框架”这一点而言,它依然是一本扎实、耐读的中文入门书。

Who it's for

A good fit for

  • 已掌握 Python 基础,想系统入门自然语言处理与文本分析的学习者
  • 需要用 Python 处理评论、新闻、文档等非结构化文本的数据分析与算法工程师
  • 对机器学习分类、聚类、情感分析有兴趣,希望理解算法背后原理的高年级本科生与研究生
  • 从事舆情分析、用户反馈分析、内容运营且需要技术落地能力的从业者

Not a good fit for

  • 完全没有编程基础、尚未写过 Python 代码的读者
  • 希望直接学习 Transformer、BERT 等预训练大模型最新技术的读者
  • 只想找可直接复制粘贴的生产级代码、不关注原理与评估方法的人

Reading tips

  1. 建议先通读第1章与第2章,把语言学概念与 Python 文本处理基础打通,再进入代码较多的后续章节。
  2. 第3章的分词、规范化、词性标注建议边读边动手,用自己手上的评论或新闻数据走一遍流水线。
  3. 第4章到第7章可结合书中案例做改造练习,把新闻分类、影评情感分析换成自己熟悉的领域数据。
  4. 书中代码基于较早版本的工具库,运行时请对照 nltk、scikit-learn、spaCy 的当前官方文档修正 API。

About the publisher

China Machine Press China · Founded in 1950

In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.

Contents

  1. Translator's Preface
  2. Preface
  3. Chapter 1 Foundations of Natural Language
  4. Chapter 2 A Python Refresher
  5. Chapter 3 Processing and Understanding Text
  6. Chapter 4 Text Classification
  7. Chapter 5 Text Summarization
  8. Chapter 6 Text Similarity and Clustering
  9. Chapter 7 Semantic and Sentiment Analysis

FAQ

这本书适合零基础学 Python 的人读吗?
不太适合。虽然第2章回顾了 Python 语法、数据结构与函数式编程,但篇幅有限、节奏偏快,更适合已经能独立写 Python 脚本、只是不熟悉文本处理流程的读者。完全没有编程经验的人建议先补一门 Python 入门课再回来阅读。
这本书和《Python文本分析(原书第2版)》有什么区别?
本书是2018年出版的第1版中译本,共七章、约273页,ISBN 9787111593249;第2版于2020年由机械工业出版社出版,页数与内容有所扩充,增加了词袋、N-Gram、TF-IDF、LDA 等特征工程与主题模型的讲解。购买时请按 ISBN 区分,不要混为一谈。
书中的代码和工具库现在还能用吗?
书中的思路与算法仍然成立,但部分代码依赖的 nltk、scikit-learn、spaCy 等库已多次更新,个别接口、参数名和数据下载方式有变化。建议按当前版本官方文档调整后再运行,遇到报错优先查阅对应库的更新说明。
读完能掌握哪些实际能力?
大致可以独立完成一套文本分析流程:读取并清洗文本、分词与规范化、词性标注与句法分析、构建 TF-IDF 等特征、训练朴素贝叶斯或 SVM 分类器并评估效果,以及做主题建模、文本聚类和情感分析,并理解这些方法各自的适用边界。
书里有中文分词的内容吗?
本书以英文文本为主线,分词、词干提取、词形还原等章节的方法与示例主要面向英文语料,并未系统讲解 jieba 等中文分词工具。处理中文的读者可以把书中的框架迁移过来,但分词与停用词部分需要额外查阅中文分词相关资料。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category