Text Processing in Python
David Mertz
- 出版商: Addison Wesley
- 出版日期: 2003-06-02
- 售價: $2,180
- 貴賓價: 9.5 折 $2,071
- 語言: 英文
- 頁數: 544
- 裝訂: Paperback
- ISBN: 0321112547
- ISBN-13: 9780321112545
-
相關分類:
Python、程式語言
海外代購書籍(需單獨結帳)
買這商品的人也買了...
-
$1,029Fundamentals of Data Structures in C++
-
$580$383 -
$680$449 -
$420$357 -
$580$452 -
$970Introduction to Algorithms, 2/e
-
$920$607 -
$880$695 -
$650$553 -
$580$383 -
$760$600 -
$580$458 -
$590$466 -
$680$449 -
$600$540 -
$690$538 -
$420$277 -
$720$562 -
$290$226 -
$720$475 -
$580$383 -
$750$675 -
$560$504 -
$2,350$2,233 -
$480$379
相關主題
商品描述
Table of Contents
Preface.
What Is Text Processing?
The Philosophy of Text Processing.
What You'll Need to Use This Book.
Conventions Used in This Book.
A Word on Source Code Examples.
External Resources.
The Philosophy of Text Processing.
What You'll Need to Use This Book.
Conventions Used in This Book.
A Word on Source Code Examples.
External Resources.
1. Python Basics.
Techniques and Patterns.
Standard Modules.
Other Modules in the Standard Library.
Utilizing Higher-Order Functions in Text
Processing.
Exercise: More on combinatorial functions.
Specializing Python Datatypes.
Base Classes for Datatypes.
Exercise: Filling out the forms (or deciding not to)
Problem: Working with lines from a large file.
Exercise: More on combinatorial functions.
Specializing Python Datatypes.
Base Classes for Datatypes.
Exercise: Filling out the forms (or deciding not to)
Problem: Working with lines from a large file.
Standard Modules.
Working with the Python Interpreter.
Working with the Local Filesystem.
Running External Commands and Accessing OS Features.
Special Data Values and Formats.
Working with the Local Filesystem.
Running External Commands and Accessing OS Features.
Special Data Values and Formats.
Other Modules in the Standard Library.
Serializing and Storing Python Objects.
Platform Specific Operations.
Working with Multi-Media Formats.
Miscellaneous Other Modules.
Platform Specific Operations.
Working with Multi-Media Formats.
Miscellaneous Other Modules.
2. Basic String Operations.
Some Common Tasks.
Standard Modules.
Solving Problems.
Problem: Quickly sorting lines on custom
criteria.
Problem: Reformatting paragraphs of text.
Problem: Column statistics for delimited or flat-record files.
Problem: Counting characters, words, lines and paragraphs.
Problem: Transmit binary data as ASCII.
Problem: Creating word or letter histograms.
Problem: Reading a file backwards by record, line, or paragraph.
Problem: Reformatting paragraphs of text.
Problem: Column statistics for delimited or flat-record files.
Problem: Counting characters, words, lines and paragraphs.
Problem: Transmit binary data as ASCII.
Problem: Creating word or letter histograms.
Problem: Reading a file backwards by record, line, or paragraph.
Standard Modules.
Basic String Transformations.
Strings as Files, and Files as Strings.
Converting Between Binary and ASCII.
Cryptography.
Compression.
Unicode.
Strings as Files, and Files as Strings.
Converting Between Binary and ASCII.
Cryptography.
Compression.
Unicode.
Solving Problems.
Exercise: Many ways to take out the garbage.
Exercise: Making sure things are what they should be
Exercise: Finding needles in haystacks (full-text indexing).
Exercise: Making sure things are what they should be
Exercise: Finding needles in haystacks (full-text indexing).
3. Regular Expressions.
A Regular Expression Tutorial.
Some Common Tasks.
Standard Modules.
Just What is a Regular Expression Anyway?
Matching Patterns In Text: The Basics.
Matching Patterns In Text: Intermediate.
Advanced Regular Expression Extensions.
Matching Patterns In Text: The Basics.
Matching Patterns In Text: Intermediate.
Advanced Regular Expression Extensions.
Some Common Tasks.
Problem: Making a text block flush left.
Problem: Summarizing command-line option documentation.
Problem: Detecting duplicate words.
Problem: Checking for server errors.
Problem: Reading lines with continuation characters
Problem: Identifying URLs and email addresses in texts.
Problem: Pretty printing numbers.
Problem: Summarizing command-line option documentation.
Problem: Detecting duplicate words.
Problem: Checking for server errors.
Problem: Reading lines with continuation characters
Problem: Identifying URLs and email addresses in texts.
Problem: Pretty printing numbers.
Standard Modules.
Versions and optimizations.
Simple Pattern Matching.
Regular Expression Modules.
Simple Pattern Matching.
Regular Expression Modules.
4. Parsers and State Machines.
An Introduction to Parsers.
An Introduction to State Machines.
Parser Libraries for Python.
When data becomes deep and texts become
stateful.
What is a grammar?
An EBNF grammar for IF/THEN/END structures.
Pencil-and-Paper Parsing.
Exercise: Some variations on the language.
What is a grammar?
An EBNF grammar for IF/THEN/END structures.
Pencil-and-Paper Parsing.
Exercise: Some variations on the language.
An Introduction to State Machines.
Understanding State Machines.
Text Processing State Machines.
When Not To Use A State Machine.
When to Use a State Machine.
An Abstract State Machine Class.
Processing a Report with a Concrete State Machine.
Subgraphs and State Reuse.
Exercise: Finding other solutions.
Text Processing State Machines.
When Not To Use A State Machine.
When to Use a State Machine.
An Abstract State Machine Class.
Processing a Report with a Concrete State Machine.
Subgraphs and State Reuse.
Exercise: Finding other solutions.
Parser Libraries for Python.
Specialized Parsers in the Standard Library.
Low-Level State Machine Parsing.
High-Level EBNF Parsing.
High-Level Programmatic Parsing.
Low-Level State Machine Parsing.
High-Level EBNF Parsing.
High-Level Programmatic Parsing.
5. Internet Tools and Techniques.
Working With Email and Newsgroups.
World Wide Web Applications.
Synopses of Other Internet Modules.
Understanding XML.
Manipulating and Creating Message Texts.
Communicating with Mail Servers.
Message Collections and Message Parts.
Communicating with Mail Servers.
Message Collections and Message Parts.
World Wide Web Applications.
Common Gateway Interface.
Parsing, Creating, and Manipulating HTML Documents.
Accessing Internet Resources.
Parsing, Creating, and Manipulating HTML Documents.
Accessing Internet Resources.
Synopses of Other Internet Modules.
Standard Internet-Related Tools.
Third Party Internet-Related Tools.
Third Party Internet-Related Tools.
Understanding XML.
Python Standard Library XML Modules.
Third Party XML-Related Tools
Third Party XML-Related Tools
A. A Selective and Impressionistic Short Review of Python.
B. A Data Compression Primer.
C. Understanding Unicode.
D. A State-Machine for Adding Markup to Text.
E.
Glossary.
E. Glossary.