Skip to Main Content
Natural Language Processing with Java - Second Edition
book

Natural Language Processing with Java - Second Edition

by Richard M. Reese, AshishSingh Bhatia
July 2018
Beginner to intermediate content levelBeginner to intermediate
318 pages
7h 49m
English
Packt Publishing
Content preview from Natural Language Processing with Java - Second Edition

Using OpenNLP chunking

The process of chunking involves breaking a sentence into parts or chunks. These chunks can then be annotated with tags. We will use the ChunkerME class to illustrate how this is accomplished. This class uses a model loaded into a ChunkerModel instance. The ChunkerME class's chunk method performs the actual chunking process. We will also examine the use of the chunkAsSpans method to return information about the span of these chunks. This allows us to see how long a chunk is and what elements make up the chunk.

We will use the en-pos-maxent.bin file to create a model for the POSTaggerME instance. We need to use this instance to tag the text as we did in the Using OpenNLP POSTaggerME class for POS taggers section earlier ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Natural Language Processing with Java Cookbook

Natural Language Processing with Java Cookbook

Richard M. Reese, Richard M Reese
Natural Language Processing in Action

Natural Language Processing in Action

Cole Howard, Hobson Lane, Hannes Hapke
Natural Language Processing with Python

Natural Language Processing with Python

Steven Bird, Ewan Klein, Edward Loper

Publisher Resources

ISBN: 9781788993494Supplemental Content