Text processing in Python [2. print ed.] 0321112547, 9780321112545

Text Processing with Python, written by Python authority David Mertz, teaches programmers how to accomplish numerous tex

247 102 3MB

English Pages XX, 520 Seiten [479] Year 2003;2005

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Main Page......Page 1
Table of content......Page 3
Copyright......Page 5
Preface......Page 7
0.1 What Is Text Processing?......Page 8
0.2 The Philosophy of Text Processing......Page 9
0.3 What You'll Need to Use This Book......Page 10
0.4 Conventions Used in This Book......Page 11
0.5 A Word on Source Code Examples......Page 14
0.6 External Resources......Page 15
Acknowledgments......Page 17
Chapter 1. Python Basics......Page 21
1.1 Techniques and Patterns......Page 22
1.2 Standard Modules......Page 59
1.3 Other Modules in the Standard Library......Page 113
Chapter 2. Basic String Operations......Page 141
2.1 Some Common Tasks......Page 142
2.2 Standard Modules......Page 155
2.3 Solving Problems......Page 220
Chapter 3. Regular Expressions......Page 228
3.1 A Regular Expression Tutorial......Page 229
3.2 Some Common Tasks......Page 241
3.3 Standard Modules......Page 249
Chapter 4. Parsers and State Machines......Page 274
4.1 An Introduction to Parsers......Page 275
4.2 An Introduction to State Machines......Page 282
4.3 Parser Libraries for Python......Page 294
Chapter 5. Internet Tools and Techniques......Page 346
5.1 Working with Email and Newsgroups......Page 347
5.2 World Wide Web Applications......Page 380
5.3 Synopses of Other Internet Modules......Page 398
5.4 Understanding XML......Page 405
Appendix A. A Selective and Impressionistic Short Review of Python......Page 418
A.1 What Kind of Language Is Python?......Page 419
A.2 Namespaces and Bindings......Page 420
A.3 Datatypes......Page 424
A.4 Flow Control......Page 433
A.5 Functional Programming......Page 444
Appendix B. A Data Compression Primer......Page 448
B.1 Introduction......Page 449
B.2 Lossless and Lossy Compression......Page 450
B.3 A Data Set Example......Page 451
B.4 Whitespace Compression......Page 452
B.5 Run-Length Encoding......Page 453
B.6 Huffman Encoding......Page 454
B.7 Lempel Ziv-Compression......Page 455
B.8 Solving the Right Problem......Page 456
B.9 A Custom Text Compressor......Page 457
B.10 References......Page 461
Appendix C. Understanding Unicode......Page 462
C.1 Some Background on Characters......Page 463
C.2 What Is Unicode?......Page 464
C.3 Encodings......Page 465
C.4 Declarations......Page 466
C.5 Finding Codepoints......Page 467
C.6 Resources......Page 468
Appendix D. A State Machine for Adding Markup to Text......Page 469
Appendix E. Glossary......Page 475

Text processing in Python [2. print ed.]
 0321112547, 9780321112545

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers