content_image/1010941.jpg
The sample content set contains comments submitted by customers to a supermarket website. Among the comments are complaints about different aspects of the products and services. The following are some aspects that we might find relevant to finding and describing these complaints: 

GLYPH<SM590000> Comments that are negative 

GLYPH<SM590000> Product, service, or brand that is associated with complaints 

GLYPH<SM590000> Positive remarks about a competitor 

Now that we have added various classes and properties to each word and token appearing in the raw text, we need to look at the relationships between the words and try to detect when a complaint is being expressed. 

Sentiment analysis  is a technique for identifying when a writer is expressing a negative opinion about the subject. Negativity is often expressed in general terms, using words such as “bad” and “disappointed”. Content Analytics provides sentiment analysis, which is ready for immediate use, in the content analytics miner. For information, see 6.10, “Sentiment view” on page 222. Here we take a more domain-specific approach and limit ourselves to those words that might reference the limited range of words in our custom dictionaries for the particular domain. Some words have negative connotations only within a specific domain. For example, the word “hair” in the beauty products domain is an important word with no negativity. However, the same word in regard to food and food packaging domain, it is almost exclusively negative. 

Note: To walk through the example below, you need to have at least two dictionaries compiled and added to the CustomerComments annotator: Products and ProductDefects. 

If you do not have the entry cake  (in the Products dictionary) and moldy  (the ProductDefects dictionary), substitute with your own entries. 

To find additional annotations, we start by doing the following analysis: 

1. In the test document, enter the following text: 

It is before the expiration date, but the cake was moldy. 

2. Analyze this with the CustomerComments annotator. Among the annotations are the two as shown in Figure 11-21. 

<img src='content_image/1010941.jpg'>

3. Select the Create Parsing Rule  tab. 

