<w id="4" lex="question"/> <w id="5"/> <w id="6"/> <w id="7"/> </mi> The rule starts with a simple string constraint that matches “I.” Token #2 uses the  lex attribute that stands for the lemma (linguistic normalized form of the word).  With this attribute, you can write a constraint without listing all possible inflected  forms of a word. For example,  lex="get"  matches “get,” “gets,” “getting,” “got,”  and “gotten” that have the normalized form “get”. The lex value of token #2 is  using regular expression matching. All rules with the forward slash (/) operator  are evaluated by using  java.util.regex  classes. This lex value uses the pipe (|),  ^, $, and () operators, so that it matches “have”, “had”, “get”, and “got”. It does not  match “haven’t” and “forget” for example.  The list below contains various java.util.regex operators for custom rules: Token #3 does not have any constraints. This token can be anything in a  sentence. It is a place holder for any article or numeral such as “a,” “the,” “one,” or  “some”. Token #4 also uses a lex constraint to ignore a difference between a  singular form (question) and a plural form (questions). Tokens #5, #6, and #7 can  be any token.  The value attribute in <mi> element uses the lex variable instead of the str  variable. It intends to create facet values with no distinction, for example,  between “I have a question about Text Mining” and “I have a question about text  mining.” 298  IBM Watson Content Analytics: Discovering Actionable Insight from Your Content GLYPH<SM590000> / operator: The / operator itself is not a part of the Java regular expression  syntax. It is used only to invoke regular expression processing on a rule. GLYPH<SM590000> | operator: The pipe ( | ) operator is interpreted as the Boolean OR operator.  This operator is a literal constraint that is not interpreted by the regular  expression interpreter. Matches occur when a document contains one of the  words in the list of words to be evaluated. GLYPH<SM590000> ^ operator: This operator matches only at the beginning of a line. For  example, str="/^love/" matches loves and lovely, but does not match beloved  or glove. GLYPH<SM590000> $ operator: This operator matches only at the end of a line. For example,  str="/love$/" matches love and glove, but does not match lovely or loves. GLYPH<SM590000> ( ) operator: Parentheses are the grouping operator. Use this operator when  you want more than one word and variations of those words to be evaluated  by the Java regex interpreter.