## 11.4.1 Creating the IBM Brands annotator 

Chapter 12, “Enterprise search” on page 445 includes details about how to configure the mapping and how to use the annotation output within the enterprise search application. In this chapter, we create the annotator used for the enterprise search collection. This annotator finds IBM brand names. 

The custom annotator in Chapter 12, “Enterprise search” on page 445 creates an annotation for IBM brand names and is mapped to a similarly named facet. We include the instructions for building this annotator in here. 

The IBM Brands annotator is based on patterns, such as ‘ IBM Lotus Notes ’: 

GLYPH<SM590000> The first token ‘ IBM ’ is constrained by its literal value. 

GLYPH<SM590000> The next token is a titlecase token. 

GLYPH<SM590000> The registered trademark symbol is optional. 

GLYPH<SM590000> The second and third tokens (titlecase and trademark) are grouped and marked as repeating. 

Create a new annotator IBMBrands: 

1. Create a new Parsing Rules database: FindIBMProducts . 

2. Create a new UIMA pipeline using the default Lexical Analysis: IBMBrands 

3. Add the empty FindIBMProducts  rule database to the IBMBrands pipeline. 

Create a rule for finding the IBM brand names: 

1. Copy the text “IBM Lotus Notes” into the text pane and run Analyze Document , choosing the IBMBrands  pipeline. 

2. Copy and past the text into the Selection  tab text box of the rule editor. 

3. Delete all tokens except for the first three. 

4. Adjust the resulting token properties, according to the example in Figure 11-31 on page 439. 

5. Right-click the registered trademark token and select Repeats , and enter 0 or 1 time. 

6. Select the Titlecase token and registered trademark token and group them by right-clicking and select Group   Ordered . 

7. Right-click the new group and set Repeats and select Repeating one or more times . 

