Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Natural Language Processing with Java and LingPipe Cookbook
  • Table Of Contents Toc
Natural Language Processing with Java and LingPipe Cookbook

Natural Language Processing with Java and LingPipe Cookbook

By : Krishna Dayanidhi
4.8 (4)
close
close
Natural Language Processing with Java and LingPipe Cookbook

Natural Language Processing with Java and LingPipe Cookbook

4.8 (4)
By: Krishna Dayanidhi

Overview of this book

This book is for experienced Java developers with NLP needs, whether academics, industrialists, or hobbyists. A basic knowledge of NLP terminology will be beneficial.
Table of Contents (9 chapters)
close
close
8
Index

Customizing feature extraction


Logistic regression allows for arbitrary features to be used. Features are any observations that can be made about data being classified. Some examples are as follows:

  • Words/tokens from the text.

  • We found that character ngrams work very well in lieu of words or stemmed words. For small data sets of less than 10,000 words of training, we will use 2-4 grams. Bigger training data can merit a longer gram, but we have never had good results above 8-gram characters.

  • Output from another component can be a feature, for example, a part-of-speech tagger.

  • Metadata known about the text, for example, the location of a tweet or time of the day it was created.

  • Recognition of dates and numbers abstracted from the actual value.

How to do it…

The source for this recipe is in src/com/lingpipe/cookbook/chapter3/ContainsNumberFeatureExtractor.java.

  1. Feature extractors are straightforward to build. The following is a feature extractor that returns a CONTAINS_NUMBER feature with weight 1...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Natural Language Processing with Java and LingPipe Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon