Programming Books C Java PHP Python Learn more Browse Programming Books
  • List Price: $54.99
  • Save: $13.20 (24%)
Only 4 left in stock (more on the way).
Ships from and sold by
Gift-wrap available.
Add to Cart
FREE Shipping on orders over $35.
Used: Very Good | Details
Sold by lomaxdirect
Condition: Used: Very Good
Comment: Book is in very good condition with minor wear to cover, tight binding. Text is clean of any markings, writing, or highlighting.
Access codes and supplements are not guaranteed with used items.
Add to Cart
Trade in your item
Get a $2.00
Gift Card.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Text Processing in Python Paperback – June 12, 2003

ISBN-13: 978-0321112545 ISBN-10: 0321112547 Edition: 1st

Buy New
Price: $41.79
22 New from $33.58 32 Used from $10.23
Amazon Price New from Used from
"Please retry"
"Please retry"
$33.58 $10.23


Frequently Bought Together

Text Processing in Python + Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython
Price for both: $67.03

Buy the selected items together


Save up to 90% on Textbooks
Rent textbooks, buy textbooks, or get up to 80% back when you sell us your books. Shop Now

Product Details

  • Paperback: 544 pages
  • Publisher: Addison-Wesley Professional; 1 edition (June 12, 2003)
  • Language: English
  • ISBN-10: 0321112547
  • ISBN-13: 978-0321112545
  • Product Dimensions: 9.4 x 6.7 x 1.2 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (19 customer reviews)
  • Amazon Best Sellers Rank: #1,355,007 in Books (See Top 100 in Books)

Editorial Reviews

From the Back Cover

Text Processing in Python is an example-driven, hands-on tutorial that carefully teaches programmers how to accomplish numerous text processing tasks using the Python language. Filled with concrete examples, this book provides efficient and effective solutions to specific text processing problems and practical strategies for dealing with all types of text processing challenges.

Text Processing in Python begins with an introduction to text processing and contains a quick Python tutorial to get you up to speed. It then delves into essential text processing subject areas, including string operations, regular expressions, parsers and state machines, and Internet tools and techniques. Appendixes cover such important topics as data compression and Unicode. A comprehensive index and plentiful cross-referencing offer easy access to available information. In addition, exercises throughout the book provide readers with further opportunity to hone their skills either on their own or in the classroom. A companion Web site ( contains source code and examples from the book.

Here is some of what you will find in thie book:

  • When do I use formal parsers to process structured and semi-structured data? Page 257
  • How do I work with full text indexing? Page 199
  • What patterns in text can be expressed using regular expressions? Page 204
  • How do I find a URL or an email address in text? Page 228
  • How do I process a report with a concrete state machine? Page 274
  • How do I parse, create, and manipulate internet formats? Page 345
  • How do I handle lossless and lossy compression? Page 454
  • How do I find codepoints in Unicode? Page 465


About the Author

David Mertz came to writing about programming via the unlikely route of first being a humanities professor. Along the way, he was a senior software developer, and now runs his own development company, Gnosis Software ("We know stuff!"). David writes regular columns and articles for IBM developerWorks, Intel Developer Network, O'Reilly ONLamp, and other publications.


More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.4 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 19 customer reviews
I thought they were very well written.
John C. Dunbar
There are others as well, and after you've gotten started, you'll be a better judge than I am of what will be most useful to you.
John S. Ryan
If you are an expert Python programmer, you will also benefit from this book.
Ronald D. Stephens

Most Helpful Customer Reviews

49 of 51 people found the following review helpful By Ronald D. Stephens on July 5, 2003
Format: Paperback
Text Processing in Python, by David Mertz, 2003, Addison Wesley, 520 pages.
If you have read an introductory book or two about programming, but you are far from being an expert, then you will benefit a lot from reading this book. If you are a competent programmer in any other language, you will benefit from this book. If you are an expert Python programmer, you will also benefit from this book.
For, as you know, there are many good introductory texts about Python. This is not one of them, for this is an advanced book, but not an inaccessible one. David Mertz has a unique style and focus that we have become familiar with from his "Charming Python" series of articles on the IBM Developer Network. Dr. Mertz is more interested in facilitating our learning process than in lecturing us, and rather than fill his pages with impressive examples designed to illustrate his expertise, he gently guides us by offering subtle yet important examples of code and analysis that makes us think for ourselves.
He has a special talent for programming in the functional style, and this is a great introduction to that style of Python programming. Thus, this is also a good guide to using the newer features introduced into Python in the last few revisions, which often facilitate the functional style of programming.
The text includes, in an appendix, a 40 page tutorial covering the basic Python language. This tutorial is, like the book, unique in its approach and is worthwhile even for experienced Pythonistas, as it sheds light on some of the underlying ideas behind the syntax and semantics, and it also illustrates the functional style of programming, which is sometimes quite useful when doing text processing. And, despite its many other virtues, this is a book about text processing.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
41 of 44 people found the following review helpful By John S. Ryan on September 2, 2003
Format: Paperback Verified Purchase
Yes, I mean it: this is a beautiful book. If your aesthetic sensibilities have been informed, directly or indirectly, by Kernighan and Ritchie's influential book on C, you'll know what I mean.
I've been programming computers in various capacities since I was in my early teens (the mid-1970s) and I've been through a number of languages. Not long ago I discovered Python, and I suspect I won't need to learn any other languages for quite a long time. Guido van Rossum is a wizard.
If you're interested in learning Python, don't start here. If you've got some programming background already, Guido's tutorial (which comes bundled with the Python download) will be enough to get you rolling. I personally recommend all of O'Reilly's books on the subject (_Learning Python_ for the absolute beginner, Mark Lutz's idiosyncratic but highly useful _Programming Python_ for the next level up, the magisterial _Python Cookbook_ for pretty much anybody, and the _Nutshell_ book to be placed permanently next to your keyboard). There are others as well, and after you've gotten started, you'll be a better judge than I am of what will be most useful to you. (But I'd skip the vastly overpriced and not-very-deep _Python Programming Patterns_ unless you can buy it used.)
This one's for later; although it does offer some beginning instruction in Python, it isn't really an introductory book. However, if you do any text processing with Python -- which you almost undoubtedly do if you use Python at all -- then you _do_ want this book even if you don't know it yet.
Most of what you'll want to know is in chapter two, which sets out the basics of string processing in Python.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
22 of 24 people found the following review helpful By John C. Dunbar on February 28, 2004
Format: Paperback
This is the only book that really attacks the issue of string processing using Python. Unfortunately it didn't attack the text processing problems that I wanted discussed.
Also, in the area of Regular Expressions the examples didn't directly use the Python library, instead a wrap around function was used for the many examples and that detracted from using the book as a reference book for this purpose.
I found that Python has several different ways to do string processing. Also, some of those ways come up with conflicting results. At the time of this writing the authors of Python are re-organizing and improving this area.
What is truly great about the book is the discussion of state machines, parsers, and functional programming. Although these topics detract from the focus on string processing somewhat this book is perhaps the only popular Python book out there that does these topics justice. I thought they were very well written.
My overall complaint is that this book includes too many things outside of text processing using the core Python language. But other readers may appreciate this aspect more than I did. If you want coverage on handling email specifically, the author covers that. Same with HTML processing and other specialized topics. I just wanted to low down on using the full string processing capabilities of the core Python language -- not necessarily all the specialized libraries.
I found string processing to be messy with Python but found Ruby to be much easier. That is perhaps because Ruby is a newer language and it has some features of Perl built in. Ruby however does not have the extent of libraries available like Python, nor does it have as nice of Windows GUI.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Customer Images

Most Recent Customer Reviews


What Other Items Do Customers Buy After Viewing This Item?