Skip to content
  • Language Processing and Python
    • 1.1 Computing with Language: Texts and Words
    • 1.2 A Closer Look at Python: Texts as Lists of Words
    • 1.3 Computing with Language: Simple Statistics
    • 1.4 Back to Python: Making Decisions and Taking Control
    • 1.5 Automatic Natural Language Understanding
  • Accessing Text Corporaand Lexical Resources
    • 2.1 Accessing Text Corpora
    • 2.2 Conditional Frequency Distributions
    • 2.3 More Python: Reusing Code
    • 2.4 Lexical Resources
    • 2.5 WordNet
  • Processing Raw Text
    • 3.1 Accessing Text from the Web and from Disk
    • 3.2 Strings: Text Processing at the Lowest Level
    • 3.3 Text Processing with Unicode
    • 3.4 Regular Expressions for Detecting Word Patterns
    • 3.5 Useful Applications of Regular Expressions
  • Writing Structured Programs
    • 4.1 Back to the Basics
    • 4.2 Sequences
    • 4.3 Questions of Style
    • 4.4 Functions: The Foundation of Structured Programming
    • 4.5 Doing More with Functions
  • Categorizing and Tagging Words
    • 5.1 Using a Tagger
    • 5.2 Tagged Corpora
    • 5.3 Mapping Words to Properties Using Python Dictionaries
    • 5.4 Automatic Tagging
    • 5.5 N-Gram Tagging
  • Sentiment Checker
iatl
    • 1.1 Computing with Language: Texts and Words
    • 1.2 A Closer Look at Python: Texts as Lists of Words
    • 1.3 Computing with Language: Simple Statistics
    • 1.4 Back to Python: Making Decisions and Taking Control
    • 1.5 Automatic Natural Language Understanding
    • 2.1 Accessing Text Corpora
    • 2.2 Conditional Frequency Distributions
    • 2.3 More Python: Reusing Code
    • 2.4 Lexical Resources
    • 2.5 WordNet
    • 3.1 Accessing Text from the Web and from Disk
    • 3.2 Strings: Text Processing at the Lowest Level
    • 3.3 Text Processing with Unicode
    • 3.4 Regular Expressions for Detecting Word Patterns
    • 3.5 Useful Applications of Regular Expressions
    • 4.1 Back to the Basics
    • 4.2 Sequences
    • 4.3 Questions of Style
    • 4.4 Functions: The Foundation of Structured Programming
    • 4.5 Doing More with Functions
    • 5.1 Using a Tagger
    • 5.2 Tagged Corpora
    • 5.3 Mapping Words to Properties Using Python Dictionaries
    • 5.4 Automatic Tagging
    • 5.5 N-Gram Tagging
  • Sentiment Checker
Search this website

Author: Syeiba

This author has written 25 articles
  1. Home>
  2. Syeiba>
  3. Page 2

3.5 Useful Applications of Regular Expressions

  • Post author:Syeiba
  • Post published: November 3, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Doing More with Word PiecesOnce we can use re.findall() to extract material from words, there are interestingthings to do with the pieces, such as glue them back together or plot…

Continue Reading3.5 Useful Applications of Regular Expressions

3.4 Regular Expressions for Detecting Word Patterns

  • Post author:Syeiba
  • Post published: November 3, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Many linguistic processing tasks involve pattern matching. For example, we can findwords ending with ed using endswith('ed'). Regular expressions give us a more powerful and flexible method for describing the…

Continue Reading3.4 Regular Expressions for Detecting Word Patterns

3.3 Text Processing with Unicode

  • Post author:Syeiba
  • Post published: November 3, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Unicode supports over a million characters. Each character is assigned a number, calleda code point. In Python, code points are written in the form \uXXXX, where XXXXis the number in…

Continue Reading3.3 Text Processing with Unicode

3.2 Strings: Text Processing at the Lowest Level

  • Post author:Syeiba
  • Post published: November 3, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

It’s time to study a fundamental data type that we’ve been studiously avoiding so far.In earlier chapters we focused on a text as a list of words. We didn’t look…

Continue Reading3.2 Strings: Text Processing at the Lowest Level

3.1 Accessing Text from the Web and from Disk

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Electronic Books A small sample of texts from Project Gutenberg appears in the NLTK corpus collection. However, you may be interested in analyzing other texts from Project Gutenberg. You can…

Continue Reading3.1 Accessing Text from the Web and from Disk

2.5 WordNet

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Senses and SynonymsConsider the sentence in (1a). If we replace the word motorcar in (1a) with automobile, to get (1b), the meaning of the sentence stays pretty much the same:(1)…

Continue Reading2.5 WordNet

2.4 Lexical Resources

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

A lexicon, or lexical resource, is a collection of words and/or phrases along with associated information, such as part-of-speech and sense definitions. Lexical resources aresecondary to texts, and are usually…

Continue Reading2.4 Lexical Resources

2.3 More Python: Reusing Code

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Creating Programs with a Text EditorThe Python interactive interpreter performs your instructions as soon as you type them.Often, it is better to compose a multiline program using a text editor,…

Continue Reading2.3 More Python: Reusing Code

2.2 Conditional Frequency Distributions

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

We introduced frequency distributions in Section 1.3. We saw that given some listmylist of words or other items, FreqDist(mylist) would compute the number ofoccurrences of each item in the list.…

Continue Reading2.2 Conditional Frequency Distributions

2.1 Accessing Text Corpora

  • Post author:Syeiba
  • Post published: October 29, 2026
  • Post category:Uncategorized
  • Post comments:0 Comments

Gutenberg CorpusNLTK includes a small selection of texts from the Project Gutenberg electronic textarchive, which contains some 25,000 free electronic books, hosted at http://www.gutenberg.org/. We begin by getting the Python…

Continue Reading2.1 Accessing Text Corpora
  • Go to the previous page
  • 1
  • 2
  • 3
  • Go to the next page
Copyright - WordPress Theme by OceanWP