Home > Managing Categories > Defining a New Category > Configuring Category Conditions

Configuring Category Conditions

A call is assigned to a regular Category if it meets the conditions that are defined for inclusion in the Category. The conditions can include a wide variety of call characteristics, including the Program the call belongs to, Topics that were recognized in it, non-linguistic Events that were detected in it, its metadata properties, and even other Categories to which it belongs. 

Logical Expressions

Configuring Category conditions is performed by defining a logical expression for SpeechMiner to evaluate. If the logical expression is evaluated as True for a particular call, the call is assigned to the Category.

Logical expressions can consist of one or more elements. Each element is a statement, such as Date Of Call>1/19/2010 or Found topic "Reduction" at least once with Low Strictness. If a logical expression contains one element, it is True whenever the condition defined in the element is true. For example, if a logical expression contains the element Date Of Call>1/19/2010, it is True for any call whose metadata indicates that it took place on or after 1/19/2010.

Logical expressions can also contain multiple elements. When they do, the elements must be related to one another by logical operators, such as AND and OR. For example, Date Of Call>1/19/2010 AND Found topic "Reduction" at least once with Low Strictness is a logical expression that indicates both conditions must be met - the Topic must be found and the call must have taken place in the specified time period - in order for the expression to be evaluated as True and the call to be assigned to the Category.

The following operators can be used in logical expressions:

Operator  Description 
 AND  Both conditions must be met in order for the expression to be evaluated as True 
 OR  At least one of the conditions must be met in order for the expression to be evaluated as True 
 NOT The expression should be evaluated as True only when the condition is not met.  
 (  Opens a group of conditions that are evaluated as a unit 
 ) Closes a group of conditions that are evaluated as a unit 
 -> Conditional AND: Both conditions must be met, but the second condition is dependent in some way on the first (e.g., the second must occur within 30 seconds of the end of the first); this operator is used in conjunction with the Secs Rel to Start of Prev or the Secs Rel to End of Prev position setting

Logical expressions can be quite complex, containing a number of elements, various logical operators, and parentheses, if necessary. For example:

(Date Of Call>1/1/2011 AND Date Of Call<1/30/2011 AND Found topic "Payment Locations" at least once with Low Strictness) OR (Date Of Call>1/31/2011 AND (Found topic "Time Frame" at least once with Low Strictness OR Found topic "Payment Locations" at least once with Medium Strictness))

means the call should be assigned to the Category if it took place between Jan. 1st and Jan. 30th and the Topic "Reduction" was found, or if the call took place Jan. 31st or later and either the Topic "Time Frame" or the Topic "Payment Locations" was found.

Defining Logical Expressions

The logical expressions that are used as Category conditions are configured by adding elements and logical operators to the expression. 

Inserting Elements into an Expression

Elements of the following types can be included in the logical expression:  

To add an element to the logical expression:

  1. If you want to insert the element at the end of the expression, in the lower part of the right panel, click  to clear all existing selections. Otherwise, select the element in the expression before which you want to insert the new element.
  2. Under Type, select the type of element you want to add to the expression. The fields required to select and configure the element are added to the right panel below the Type field. For information about the settings and options of each type of element, see:  


  3. Click Add. The element is inserted into the expression.

Inserting Operators into an Expression

You can add logical operators (see above) to the expression as necessary to define the relationships between the elements of the expression.

Note: There is no precedence among the logical operators in an expression. For example, NOT does not take precedence over AND, as it may in other environments. Thus, NOT A AND NOT B does not mean the same as (NOT A) AND (NOT B); rather it means the same as NOT (A AND NOT B). For this reason, it is important to use parentheses to ensure that the operators define the condition as you intend them to. By contrast, the internal Not, which is an element property, always relates just to the element that follows it. Thus, Not A AND Not B does mean the same as  (NOT A) AND (NOT B).

Inserting AND, OR, NOT, and Conditional AND Operators into an Expression

AND, OR, NOT, and Conditional AND (->) define the relationship between two consecutive elements in an expression. You can add these operators to an expression as required.

To insert AND, OR, NOT, or Conditional AND into an expression:

  1. Click the second of the two consecutive elements. The element is selected.
  2. At the top of the dialog box, click the required operator. The operator is inserted into the expression before the selected element. 

Inserting Parentheses into an Expression

Parentheses can be inserted into an expression to group elements together for evaluation as a single unit. Complex expressions often require parentheses to break them into smaller expressions so that the relationships between the expressions are clear. For example, if a Topic must be found in calls handled by one of two agents, and you wrote 

Workgroup\Agent=workgroup 1/agent a OR Workgroup\Agent=workgroup 1/agent b AND Found topic "Reduction" at least once with Low Strictness 

it would not be clear whether the Topic must be found in calls handled by both agents or only in calls handled by agent b. If you add parentheses like this

(Workgroup\Agent=workgroup 1/agent a OR Workgroup\Agent=workgroup 1/agent b) AND Found topic "Reduction" at least once with Low Strictness

the Topic would have to be found in calls handled by one of the agents. But if you write

Workgroup\Agent=workgroup 1/agent a OR (Workgroup\Agent=workgroup 1/agent b AND Found topic "Reduction" at least once with Low Strictness)  

the Topic would only be required in calls handled by agent b.

To insert parentheses into an expression:

  1. Click the first element that you want to include in the parentheses. The element is selected.
  2. At the top of the dialog box, click (. A ( is inserted into the expression before the selected element. 
  3. Click the element or operator after the last element you want to include in the parentheses. If the element you want to include is the last element in the expression, do not select any items in the expression.
  4. At the top of the dialog box, click ). A ) is inserted into the expression after the last element of the expression.

Defining a Negative Condition

A negative condition is a condition that must not be met if an expression is to be evaluated as True. For example, a condition that states that a call must not have taken place in the month of January is a negative condition. Negative conditions can be specified for a single element of an expression or a group of elements that are contained in parentheses.

Two methods are available for creating a negative condition for a single element:

In the following two illustrations, a negative condition is created in each of these ways. The meanings of the two conditions are identical: the condition is True as long as the date is not on or before January 1st, 2011.

Negative condition created using the NOT operator

Negative condition created using the Not option

An expression containing multiple elements can only be marked as a negative condition using the NOT operator.  For example, in the illustration below, the NOT operator is attached to a multi-element condition. The condition is True for all workgroups except workgroup 1 and workgroup 4.

   

 NOT operator used to create a negative condition with multiple elements 

To insert a NOT operator before an element or expression:

  1. If the condition is an expression that contains multiple elements, make sure it is contained in parentheses.
  2. In the expression area of the Category definition, select the element or expression.
  3. At the top of the expression area, click Not. A NOT operator is added to the condition before the selected item.  

To select the Not option for an element:

  1. If the properties of the element are not displayed, in the expression area of the Category definition, select the element.
  2. In the condition area below the expression area, select Not
  3. Click Add or Update to add or update the negative element in the expression area.

Copying an Expression from Another Category

You can copy an expression from one Category and paste it into another Category. After you paste the expression, you can edit it as necessary, just as you would edit any other expression (see Modifying a Category). 

To copy an expression from one Category to another:

  1. In the source Category, at the top-right of the dialog box, click Copy
  2. In the target Category, at the top-right of the dialog box, click Paste. The condition expression from the source appears in the expression area of the target.

 

See also

Creating a Blank Category
Saving and Activating the Category