PP3eD/Ch-21-2

::-- JinQing [2008-04-16 02:13:30]

21.2. Strategies for Parsing Text in Python

21.2. 用Python解析文本的策略

In the grand scheme of things, there are a variety of ways to handle text processing in Python:

从整体看,Python处理文本有多种方式:



For simpler tasks, Python's built-in string object is often all we really need. Python strings can be indexed, concatenated, sliced, and processed with both string method calls and built-in functions. Our emphasis in this chapter, though, is on higher-level tools and techniques for analyzing textual information. Let's briefly explore each of the other approaches with representative examples.

对于较简单的任务,我们往往只需Python内置的字符串对象。 Python的字符串可以进行索引、拼接、切片,并且可用字符串方法和内置函数进行处理。然而,本章的重点是,分析文本信息的高级工具和技术。让我们以代表性的例子,简要地探索各种方法。

评译

PP3eD/Ch-21-2 (last edited 2009-12-25 07:13:57 by localhost)