Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
39 used & new from $13.13

Have one to sell? Sell yours here
 
   
Text Processing in Python
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get yours here.
 
  

Text Processing in Python (Paperback)

by David Mertz (Author)
4.3 out of 5 stars See all reviews (18 customer reviews)

List Price: $54.99
Price: $34.64 & this item ships for FREE with Super Saver Shipping. Details
You Save: $20.35 (37%)
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Only 3 left in stock--order soon (more on the way).

Want it delivered Monday, July 13? Choose One-Day Shipping at checkout. Details
20 new from $29.93 19 used from $13.13
Also Available in: List Price: Our Price: Other Offers:
Paperback (Import) Order it used!

Frequently Bought Together

Text Processing in Python + Python Cookbook + Learning Python, 3rd Edition
Price For All Three: $94.00

Show availability and shipping details

  • This item: Text Processing in Python by David Mertz

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Python Cookbook by Alex Martelli

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Learning Python, 3rd Edition by Mark Lutz

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Foundations of Python Network Programming

Foundations of Python Network Programming

by John Goerzen
4.7 out of 5 stars (16)  $40.49
Natural Language Processing with Python

Natural Language Processing with Python

by Steven Bird
$38.20
Python Web Programming (Landmark)

Python Web Programming (Landmark)

by Steve Holden
4.3 out of 5 stars (16)  $36.49
Beginning Python Visualization: Crafting Visual Transformation Scripts (Books for Professionals by Professionals)

Beginning Python Visualization: Crafting Visual Transformation Scripts (Books for Professionals by Professionals)

by Shai Vaingast
4.6 out of 5 stars (8)  $37.03
Python Scripting for Computational Science (Texts in Computational Science and Engineering)

Python Scripting for Computational Science (Texts in Computational Science and Engineering)

by Hans Petter Langtangen
4.4 out of 5 stars (7)  $55.96
Explore similar items

Editorial Reviews

Product Description
Text Processing in Python describes techniques for manipulation of text using the Python programming language. At the broadest level, text processing is simply taking textual information and doing something with it. This might be restructuring or reformatting it, extracting smaller bits of information from it, or performing calculations that depend on the text. Text processing is arguably what most programmers spend most of their time doing. Because Python is clear, expressive, and object-oriented it is a perfect language for doing text processing, even better than Perl. As the amount of data everywhere continues to increase, this is more and more of a challenge for programmers. This book is not a tutorial on Python. It has two other goals: helping the programmer get the job done pragmatically and efficiently; and giving the reader an understanding - both theoretically and conceptually - of why what works works and what doesn't work doesn't work. Mertz provides practical pointers and tips that emphasize efficent, flexible, and maintainable approaches to the textprocessing tasks that working programmers face daily.

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.

See all Editorial Reviews


Product Details

  • Paperback: 544 pages
  • Publisher: Addison-Wesley Professional (June 12, 2003)
  • Language: English
  • ISBN-10: 0321112547
  • ISBN-13: 978-0321112545
  • Product Dimensions: 9.1 x 6.8 x 1.3 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.3 out of 5 stars See all reviews (18 customer reviews)
  • Amazon.com Sales Rank: #80,916 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #32 in  Books > Computers & Internet > Programming > Languages & Tools > Python
    #53 in  Books > Computers & Internet > Microsoft > Word Processing
    #86 in  Books > Computers & Internet > Software > Word Processors & Editors

Look Inside This Book
Browse Sample Pages:
First Pages


What Do Customers Ultimately Buy After Viewing This Item?

Text Processing in Python
74% buy the item featured on this page:
Text Processing in Python 4.3 out of 5 stars (18)
$34.64
Learning Python, 3rd Edition
10% buy
Learning Python, 3rd Edition 3.9 out of 5 stars (137)
$26.39
Python Programming for the Absolute Beginner
7% buy
Python Programming for the Absolute Beginner 4.3 out of 5 stars (43)
$19.79
Programming Python
5% buy
Programming Python 4.0 out of 5 stars (7)
$37.79

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(2)
(2)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
Emily Gould suggested this product show on searches for "programming languages". What do you suggest?

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

18 Reviews
5 star:
 (11)
4 star:
 (4)
3 star:
 (1)
2 star:
 (2)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.3 out of 5 stars (18 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
42 of 43 people found the following review helpful:
5.0 out of 5 stars A Truly Educational Book, for those who like to learn, July 5, 2003
By Ronald D. Stephens "Book Worm" (Newtown, CT United States) - See all my reviews
(REAL NAME)   
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.

Chapter 1 covers the Python basics, but with a particular eye towards those features most critical and useful for text processing. Chapter 2 covers the basic string operations as found in the string module and the newer built-in string functions. Chapter three is about Regular Expressions, and, although I am shy about regexes because of their relative complexity, I am very glad to have read this chapter and will no longer be intimidated when regexes are the correct approach to take! Chapter 4 is on Parsers and State machines, which are important for processing nested text, as in everyday HTML, XML and the like. This chapter is not as esoteric as its title may sound to relative newbies (like myself), as it does offer useful ideas and principles for dealing with HTML. How much more useful can a topic be than that? It is true that a deep understanding of this subject may be beyond myself and other relative duffers, but this chapter has much to offer those like me and I am sure much more to offer professionals.

Chapter 5 is on Internet tools and techniques, and this a good example of how text processing touches every important area of computer programming. We manipulate text for email, newsgroups, CGI programs, HTML and many other aspects of net programming. A good summary of XML programming is included, as well as useful synopses of other Python internet modules, from a text processing point of view.

Appendix A is the aforementioned selective and short review of Python basics. Appendix B is a ten page Data Compression primer that is quite educational. Appendix C offers the same good service for Unicode, and Appendix D covers the author's own software, a state machine for adding markup to text, which is backed up by his extensive web site that has a lot of free software to support those doing extensive text processing. Lastly, Appendix E is a Glossary for technical terms from the book. This is very much an educational book, and would be suitable for classroom work at the University level, beyond the introductory programming level; in fact, as part of a curriculum to teach programming using Python at the University level, this would be an excellent text for the second course.

One of the highlights of the book is that each chapter is concluded with a problem and discussion section. These are of the highest quality I have encountered in computer texts. Rather than overwhelming the reader with a large number of problems, the author has obviously given a lifetime of thought in coming up with a few key problems that are meant to stimulate thought, creativity, and ultimately understanding and growth in the reader. I will be coming back to the problems often, as they cannot be absorbed quickly anyway; they require thought. These would be most useful in a classroom environment; but as they are accompanied by excellent discussion material, and backed up by the author's web site, the individual reader will be well served also.

The book is more than the sum of its parts. It will be a most useful reference source for when I am doing various text related tasks for some time to come, and it was also a delightful and educational quick read in the here and now. It also amply illustrates the centrality of text processing in all areas of computer science, and I am confident that the book will be useful and educational for all programmers, whatever their area of expertise.

To sum it all up, this book is educational. It is also beautifully bound and printed, and excellently written. I rate it five stars, my highest rating, and heartily recommend its purchase.

Ron Stephens

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
37 of 39 people found the following review helpful:
5.0 out of 5 stars A beautiful book, September 2, 2003
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. The other, fancier stuff in the later chapters may be handy sometimes, but author David Mertz himself will tell you not to overcomplicate things; if you can do what you need to do using string operations, do so.

Read the rest of it too, though. There's good stuff here on e.g. regular expressions and parsing that you'll find interesting and possibly useful. Just don't rush out and start trying to apply it when it isn't necessary.

Mertz is an excellent teacher. He tends to approach things from a foundation of "functional programming" -- of which I'm not particularly a fan, but he has a healthy sense of its limitations and his comments on the subject are refreshing. (If you're interested in functional programming, get a book on Haskell, which is actually a very cool language. But me, I like imperative languages just fine and I don't have any problem with "side effects" as long as they're deliberate or at least controlled.) At any rate, Mertz won't lock you in to a functional approach, but he will teach you some function-oriented stuff that will be useful to you no matter what your preferred programming style.

And his exposition is well organized and wonderfully lucid. If you're the sort of person who likes books that have a chapter zero, you'll enjoy his style.

Unless you have a strong programming background, then, you probably won't want to start your Python bookshelf with this one. But I recommend making it one of your first five.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
15 of 15 people found the following review helpful:
4.0 out of 5 stars Round the world tour of string processing for Pythoneers, February 28, 2004
By John C. Dunbar (Sugar Land, TX United States) - See all my reviews
(REAL NAME)   
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.

Overall, if you are looking for a book on text processing this is the only book out there, and a big plus with this book is what you will learn on function programming, state machines and parsers.

The author worked hard to produce a book in this specialized area. He has lots of code examples. Highly recommended for Python programmers.

John Dunbar
Sugar Land, TX

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

4.0 out of 5 stars A very good intro book
This book is interesting, the field it covers is not one with many texts, so it's hard to do comparative analysis. Read more
Published 18 months ago by Sean Fritz

5.0 out of 5 stars Instant Classic
TPIP is an instant classic in that all you need to do is add a solid understanding of python and you can instantly appreciate its classic nature. Read more
Published 22 months ago by James Stroud

3.0 out of 5 stars Valuable information poorly presented
There is a lot of good stuff in this book, but the presentation is lousy.

The first chapter dives into functional programming using obscure and terse high order... Read more
Published on April 10, 2007 by Dale Wilson

5.0 out of 5 stars And now for something different...
I'd second most of the positive statements given by other reviewers. To boot - the author's voice is clear and pleasant. Read more
Published on September 22, 2005 by R. Dlugy-Hegwer

5.0 out of 5 stars If you need to process text, this is a great book!
This book is not for everyone, but for "text processing", I know of nothing else that comes close; this book merits careful study. Read more
Published on August 1, 2005 by Elizabeth H. Papageorge

5.0 out of 5 stars Very good, somewhat advanced
This book is not for novice programmers. However, if you are an reasonably experienced programmer in Python, or any other language for that matter, this book will serve you very... Read more
Published on December 30, 2004 by Eo

4.0 out of 5 stars What is this book about?
In any booksotre you'd probably find hundreds of titles of "Web programming in XXX language". What about "Text processing in XXX language"? Read more
Published on August 1, 2004 by Waiyip Tung

5.0 out of 5 stars More author clarification
Added note: The review by phrodod was quite nice, IMO. One little thing: s/he mentions my little re_show() utility that I use in the regex tutorial. Read more
Published on June 9, 2004 by David Mertz

5.0 out of 5 stars Great Advanced Python Book
This book covers many of the details of processing text files to extract and/or generate more textual information from them. Read more
Published on May 8, 2004 by phrodod

2.0 out of 5 stars Doesn't really teach you much!
This book is not for people that are new to programming. It is also not for people new to Python. I have difficulties figuring out whom it was intended for. Read more
Published on April 24, 2004

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
   


Product Information from the Amapedia Community

Beta (What's this?)

Listmania!


Look for Similar Items by Category


$10 Instant Savings

Beauty Blender
Get a $10 instant rebate with orders of $100 or more on beauty products sold by Amazon.com. See details. Promo code: IOBeauty.

Shop all eligible items now

 

Best Books of 2008

Best of 2008
Find our top 100 editors' picks as well as customers' favorites in dozens of categories in our Best Books of 2008 Store.
 

Warm Up with a Wood Stove

Shop for Wood Stoves
Choose a wood stove for your home. A stove is one of the most popular and economical wood-powered heating options available.

Shop wood stoves

 

Best Books

Best of the Month
See our editors' picks and more of the best new books on our Best of the Month page.
 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates