- Prime Student members get £10 off with a spend of £40 or more on Books. Enter code SAVE10 at checkout. Enter code SAVE10 at checkout. Here's how (terms and conditions apply)
Text Processing in Python Paperback – 2 Jun 2003
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Special offers and product promotions
Customers who bought this item also bought
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Would you like to tell us about a lower price?
If you are a seller for this product, would you like to suggest updates through seller support?
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 (http://gnosis.cx/TPiP) 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.
Most helpful customer reviews on Amazon.com
On it's strengths, this book is probably best suited for programmers that aren't afraid to learn advanced material. It covers in great detail everything you ever wanted to know about python string processing (and honestly probably a bit more). It has a very readable style, and overall is exceptionally informative. Examples are clear, pointed, and useful.
On it's weaknesses, some material (ie parsers) might be extremely dense and hard to understand if you don't have a CS or Linguistics degree. On the other hand, if you do understand it (and the explanation is pretty good), you will end up a much better programmer for it.
Overall, I'd recommend this book for professionals with theory background that need to do advanced python work. I'd also recommend it to people without theory background, but only if they're not afraid of getting their feet wet. People who are afraid of learning should probably avoid this book.
4 stars mostly because I'm not really sure how to evaluate this book.
The first chapter dives into functional programming using obscure and terse high order functions including nested lambda expressions. He never does provide a "mere mortal" explanation for how these functions work. I was able to figure it out, but then I've been programming for 35 years in 20+ languages.
As a learning experience it was valuable debugging exercise for me, but as something for a programmer who was just getting to know Python, I can't think of a greater turn off.
Python as a rule is easy to read and easy to write. This book manages to make it unnecessarily hard.
Start with another Python book (or two, or three) then come back to this one when you have a lot of time and patience to spend. As I said there *is* some worthwhile information in there.
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.
Mertz is an exceptionally smart guy. A few of the things in this book were over my head, but most of it was not. He offers terrific insights into programming in general, and probably the best Python overview / tutorial I have ever seen (in one of the Appendices).