Book Image

Python 3 Text Processing with NLTK 3 Cookbook

By : Jacob Perkins
Book Image

Python 3 Text Processing with NLTK 3 Cookbook

By: Jacob Perkins

Overview of this book

Table of Contents (17 chapters)
Python 3 Text Processing with NLTK 3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Penn Treebank Part-of-speech Tags
Index

Chapter 6. Transforming Chunks and Trees

In this chapter, we will cover the following recipes:

  • Filtering insignificant words from a sentence

  • Correcting verb forms

  • Swapping verb phrases

  • Swapping noun cardinals

  • Swapping infinitive phrases

  • Singularizing plural nouns

  • Chaining chunk transformations

  • Converting a chunk tree to text

  • Flattening a deep tree

  • Creating a shallow tree

  • Converting tree labels