This lesson is still being designed and assembled (Pre-Alpha version)

Chunking

Overview

Time: min
Objectives

What is Chunking?

Chunking means a grouping of words or tokens into chunks.

text = '''The UIC Library Digital Scholarship Hub is a facility that is available to support students, 
staff and faculty with digital scholarship and humanities experimental research and instruction. 
The Hub provides technology, data and individual consultations to encourage creative, 
innovative and non-traditional research and development. '''
from nltk import ne_chunk
token = word_tokenize(text)
tags = nltk.pos_tag(token)
reg = "NP: {<DT>?<JJ>*<NN>}"
a = nltk.RegexpParser(reg)
result = a.parse(tags)
print(result)

Key Points