Book Review: Python 2.6 Text Processing: Beginners Guide by Jeff Mcneil
Book Review: Python 2.6 Text Processing: Beginners Guide by Jeff Mcneil
Python 2.6 Text Processing: Beginners Guide by Jeff Mcneil.
Pages 380
Publisher Packt Publishing
Price - INR 1287 (ebook INR 942.65)
Note: Those who want to sample the book can try out a chapter at the publisher's website.
This might be the only Python book dealing exclusively with text processing. The author says even those with no prior experience in text processing but with basic knowledge of Python can use the book. I doubt this.
Chapter 1 starts with a nice example of a rot-13 encoder. Instead of keeping the first few chapters simple, the author choose to introduce concepts like __main__ trick and OOP in rather haste. This chapter also introduces the readers with Python packaging. I think this section should have been kept in appendix and pip should have been explained along with easy_install with examples.
Chapter 2 is mostly about varying formats of a webserver log file. More details on exception handling would have been nice. This chapter gives a good introduction to a state machine. This chapter also features nicely done sections on handling compressed data and modules like urllib and urllib2. Context manager topic has been nicely put up in this chapter.
Most of the topics in Chapter 3, like string methods and formatting deserved place in the first chapter. These topics are easy to understand and the author has done his bit to explain them properly. This will be a nice and easy going chapter for novice Python coders.
Chapter 4 explains use of Python for parsing csv and JSON format. It is explained properly with enough examples. This chapter introduces the reader to making own Python egg-based package. It could have been kept in Appendix.
Chapter 5 is about regular expressions. Other Python books do not give enough respect to regular expressions. Many a times they put that topic in Advance Section. I am glad that this book has devoted good number of pages to this topic. Section on compiling and then using a regular expression, which is confusing to people coming from other languages, could have come earlier in the chapter with a few more pages dedicated to it. Plus there could have been some examples and more explanation on parser flags in regular expressions.
Chapter 6 is for structured markup processing like XML, SAX and HTML. For some reasons, the author choose to give examples on XML, SAX, DOM before the more familiar HTML parsing. The author has given two examples which take up about 4 pages each. I find it very annoying to read a code this big in a book. A short simpler example would have been sufficient.
Chapter 7 is about templating. The examples for Mako were small, simple and easy to understand. I am not sure whether Mako deserves almost a full chapter in this book. Other systems like Zope and Cheetah were just mentioned.
Chapter 8 is about encoding and i18n. I skimmed through this chapter because I do not have any work in unicode or i18n. But it seems to be easy to understand.
Chapter 9 is about dealing with PDF format, excel format and opendocument. The author choose xlwt over its plain cousin xlrd to read and write excel data. One reason can be that xlrd is often used for reading excel data than writing it.
Chapter 10 is about advanced parsing. This chapter deals with the PyParsing module, the NLTK (Python Natural Language Toolkit) which is meant for processing natural languages like English. This chapter is too advanced to be included in a basis text processing book of Python. Though we deal with Bayesian filtering methods for spam handling in mail servers and clients, this is not what a person new to text processing would start with.
Chapter 11 is about indexing. I learned quite a few useful things from this chapter. But again this might not be a chapter which a novice coder would find useful. The author has described a tool called as Nucular. The author has done well to explain this tool.
Some good points about the book.
The author knows the language well enough to teach it.
It is really a one stop shop for text processing. This book might not give us the exact solution but will certainly show us the way for most of our regular text processing.
Some shortcomings of the book.
It toggles between being a reference book, a tutorial and a cookbook which might make it confusing.
A novice Python programmer might not digest all the concepts in the book easily.
Topics like ways to install modules, pip or setuptools should have been kept in Appendix.
It would have been nice if the author went out of his course a bit and described the pickle, marshal and shelve modules useful for serialization.
One annoying thing about this book is the output of the programs are shown as screenshots, which look ugly. A simple example block would have been just fine.
The price tag it carries is way too much, especially since it comes from a new author and a not very old publication house.
Conclusion : Buy this book, if you want one handy text processing book to address all your text processing needs.
Book Review: Python 2.6 Text Processing Beginner's Guide by Jeff McNei Some Of The Best SEO Company Secrets That Beginners Can Do AdWords for the beginners – What should you do in first 4 weeks? Corbett Fun Tour, To Rejuvenate Yourself Correct Golf Grip for Golf Beginners Pantie Panties: Being Sexy is All About Self Confidence Vouchers Australia – ways to save yourself money Hitlerism is as old as history itself: Bin Ali and Kaddhafi and all Arab leaders are but expressions! Part I Hitlerism is as old as history itself: Bin Ali and Kaddhafi and all Arab leaders are but expressions! Part II How To Fly RC Planes - What Beginner Need To Know Wear Art Shoes To Be Yourself Enhance Your Personal Development With Self-Hypnosis Look into yourself and you see God! It is free!
Book Review: Python 2.6 Text Processing: Beginners Guide by Jeff Mcneil Campo Grande