Performing Name Entity Recognition

When documents are analyzed, we often need to extract information about its contents and relationships between elements of the document. If we encounter a person's name, we may also be expecting that person's email address or phone number. These elements are referred to as entities. Named-entity recognition (NER) is the process of locating different types of entities within a document.

There are different types of entities, including names, addresses, dates, and locations. Likewise, there are different ways of isolating entities in text. We will be illustrating many of these approaches in this chapter.

There are several techniques we will demonstrate in this chapter. The variety of techniques will provide developers with options of how to find entities depending on the problem and environment in question. We will start with illustrations of how regular expressions can be used. The first uses standard Java classes, and the second will use a technique involving chunks. These are units of text that provide a convenient way of assessing entities.

Several of the recipes use neural networks. These are models that have been trained for both general and specialized types of documents. In the last recipe, we will illustrate how to train a model to find entities.

In this chapter, we will cover the following recipes:

  • Using regular expressions to find entities
  • Using chunks with regular expressions to identify entities
  • Using OpenNLP to find entities in text
  • Isolating multiple entities types
  • Using a CRF model to find entities in a document
  • Using a chunker to find entities
  • Training a specialized NER model
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.44.212