content_image/988037.jpg
</mi> 

Each <w> element defines a token to be extracted and analyzed. Tokens #1, #2, and #3 use a simple string constraint that matches an actual word. Token #4, #5, and #6 do not have any constraint, meaning they can be any token in a sentence. 

In the <mi> element, you must specify the facet path as the category attribute and the value attribute that is showing in the application as the keyword. The value attribute is a template of the output keyword. 

After you save this rule within the Text Analytics Rules Editor, you must apply it and verify results. In this case, assume that the pattern matcher annotator examines the sentence “I need information about Text Mining.” You can see that the annotator captures this sentence and assigns it to the VOC/Question facet with a keyword of “Question about Text Mining” as shown in Figure 8-35. 

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

You also notice another generic expression that asks a question directly. To see the actual sentences, you can attempt a simple search with the keyword “question” and find several sentences in your collection: 

I got a question regarding ... 

I have a question about ... 

I have several questions on ... 

To capture this type of expression, we add a rule as shown in Example 8-4. 

<mi category="$.voc.question" value="Question ${5.lex} ${6.lex} ${7.lex}"> <w id="1" str="I"/> <w id="2" lex="/(^have$)|(^get$)/"/> <w id="3"/> 

