To RE or not to RE - parsing text in Python (#91)
Anna M Ravenscroft (Stanford University)
30min Beginner
categories:
parsing, python newbie
Text parsing - breaking up text into smaller parts for processing - is a common task for programmers. Whether you're tokenizing a sentence for Part of Speech tagging in computational linguistics, automatically checking logs for specific errors, or doing Hidden Markov Models to output Emily Dickinson-style poems, chances are, at some point in your programming, you'll need to do text parsing.
One of the most common methods of doing text parsing uses a specialized pattern-recognition language called regular expressions. Regular expressions (REs) can be intimidating to a new programmer; they may try to avoid REs at all costs. Others will turn to REs out of unfamiliarity with the wonders of Python native string manipulation. This talk will focus on the basics:
* when and how can you use Python's native string methods,
* when to consider REs, and
* how to do simple text parsing.
One of the most common methods of doing text parsing uses a specialized pattern-recognition language called regular expressions. Regular expressions (REs) can be intimidating to a new programmer; they may try to avoid REs at all costs. Others will turn to REs out of unfamiliarity with the wonders of Python native string manipulation. This talk will focus on the basics:
* when and how can you use Python's native string methods,
* when to consider REs, and
* how to do simple text parsing.
Files:
| file | size | uploaded | comment |
|---|---|---|---|
| toreornottore.pdf | 1.9 MB | Sat, March 15th, 12:42 p.m. | pdf of talk |
# Permalink
.