Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Natural Language Processing with Java and LingPipe Cookbook

You're reading from  Natural Language Processing with Java and LingPipe Cookbook

Product type Book
Published in Nov 2014
Publisher
ISBN-13 9781783284672
Pages 312 pages
Edition 1st Edition
Languages

Table of Contents (14) Chapters

Natural Language Processing with Java and LingPipe Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Simple Classifiers 2. Finding and Working with Words 3. Advanced Classifiers 4. Tagging Words and Tokens 5. Finding Spans in Text – Chunking 6. String Comparison and Clustering 7. Finding Coreference Between Concepts/People Index

Hidden Markov Models (HMM) – part-of-speech


This recipe brings in the first hard-core linguistic capability of LingPipe; it refers to the grammatical category for words or part-of-speech (POS). What are the verbs, nouns, adjectives, and so on in text?

How to do it...

Let's jump right in and drag ourselves back to those awkward middle-school years in English class or our equivalent:

  1. As always, head over to your friendly command prompt and type the following:

    java -cp lingpipe-cookbook.1.0.jar:lib/lingpipe-4.1.0.jar: com.lingpipe.cookbook.chapter9.PosTagger 
    
  2. The system will respond with a prompt to which we will add a Jorge Luis Borges quote:

    INPUT> Reality is not always probable, or likely.
    
  3. The system will respond delightfully to this quote with:

    Reality_nn is_bez not_* always_rb probable_jj ,_, or_cc likely_jj ._. 
    

Appended to each token is _ with a part-of-speech tag; nn is noun, rb is adverb, and so on. The complete tag set and description of the corpus of the tagger can be found at http...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}