Skip to main content
Loading...
Skip to article
  • Qualtrics Platform
    Qualtrics Platform
  • Customer Journey Optimizer
    Customer Journey Optimizer
  • XM Discover
    XM Discover
  • Qualtrics Social Connect
    Qualtrics Social Connect

Category Rules (Designer)


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


About Category Rules

Category rules determine which sentences should be assigned to each category. Category rules are typically examples of words that you want to be included or excluded in the category.

Basic Rules

Basic rules categorize sentences by specifying words that should either be included or excluded in a sentence.

  1. Select a category or category group.
    Select a category and highlights the preview all rules button
  2. Type words within quotations, or drag a key word from the all words tab, into one of the 4 rule lanes.
  3. Click the preview all rules button to preview the sentences that will go into your category.
Example: Let’s say you want to create a category for “Commute”. The rules should contain words that are related to commuting to work (like “commute” or“travel”), and exclude words that are unrelated to commuting but could show up in the search (“drive” or “get to work”).

Some characters are used to create advanced search operators and therefore will affect the results if used to build a rule. The following characters can be used to basic rule creation:

  • Letters
  • Numbers
  • Percent sign ( % )
  • Emojis
  • Emoticons
  • Currency symbols ( $, €, £ )
Qtip: When building a rule,i f you’re including words or phrases that contain contractions (e.g. “couldn’t find” or “didn’t fit”), these should be written into the rule in their full form and inside quotes (e.g. “could not” or “did not”).

Using the 4 Rule Lanes

There are 4 rule lanes that determine the relationship of the words in the rule: OR, AND, AND, NOT.

The rule lanes

  1. OR: This rule lane should contain words that you would like to be present in the sentences in this category.
  2. AND: These two rule lanes should contain words that must be present together with any of the words from the OR lane.
  3. NOT: This rule lane should contain words that you do not want in the category, that could have been included based on the things in the OR lane.

Rule Lane Suggestions

Rule lane suggestions helps to build categories faster by analyzing the words typed into a rule lane and suggesting synonyms, related concepts, and common misspellings.

  1. Type word(s) into a rule lane.
    Highlight rule suggestions and bring them into the rule lane
  2. Click the light bulb icon to the right of the rule lane.
  3. A window with suggested words will appear above the rule lanes showing your suggested words.
    Qtip: Sort suggested words by relevance or name.
  4. Select a suggestion by clicking the checkbox.
  5. Once finished with suggestions, click Add.

Suggestions are compatible with the following input:

  • Simple terms: e.g. “car”
  • Exact phrases: e.g. “sports car”
  • Single-character wildcards: e.g. “c?r”
  • Multiple-character wildcards: e.g. “technol*”
  • Key words: e.g. _mtoken:CAR
Qtip: Suggestions are based on a large external dataset and not specific to project data.
Attention: Suggestions ignore words and phrases with boolean operators. See Advanced Search Operators for more information.

Context Rules

Context rules categorize tweets and comments based on the content of the original post or parent document. These rules are useful when categorizing data from threaded conversations on social media.

Context rules

Example: For example, a company posts an announcement for their new product and receives lots of comments, but they only want to categorize comments from this specific post. So, they create a context rule (“New Product”) for their new product. If a basic rule is added, Designer will pull sentences that mention that rule (“Product Feature”) in comments from the extended rule (“New Product”).

A context rule is true if it relates to any sentence in the parent document and if it’s true then all sentences from all child documents get categorized. If a context rule is applied to a category group, it will also be applied to all categories in that group as an extended query to every basic rule.

Qtip: Basic and extended queries have an AND relationship, so the text gets categorized only if both conditions are met.
  1. Select a category or category group.
    Steps for doing a context rule and adding a category
  2. Click the Extended tab above the 4 rule lanes.
  3. Select Parent document from the drop-down list.
  4. Specify the rule that should apply to the original post.
  5. Add more rules, if you’d like.
  6. Click Save node.
Attention: Extended rules may increase the time it takes to categorize your model.

CONTEXT RULES FROM FACEBOOK DATA

Data from Facebook is uploaded as a post or a comment. Only comments can contain a link to a parent post, which can be used in context rules.

Qtip: Users can reply to comments on facebook. When this is the case, a comment can also serve as a parent to another comment.

CONTEXT RULES FROM TWITTER DATA

Data from Twitter can be uploaded as a tweet, a retweet, or a reply. Only replies contain a link to a parent tweet, which can be used in context rules. Replies to a retweet will have the original tweet as its parents.

Qtip: Users can reply to comments on Twitter. When this is the case, a comment can also serve as a parent to another comment.

CONTEXT RULES FROM FILE DATA

Uploaded files can have parent-child hierarchy as long as they have a column mapped to the Parent Natural ID system attribute. This should match the Natural ID of a parent document.

Verbatim-Specific Rules

A verbatim-specific rule categorizes sentences by terms that occur in the verbatim rather than the sentence. These rules are useful when working with social media data where sentence boundaries and style can differ. For more information, see Verbatim-Specific Rules.

Advanced Rule Operators

Special characters can be used for building more advanced rules.

Example: You may want to search for the term “décor”. While some responses may use the accent mark, others may have omitted. To include both options, use a single character wildcard search: “dec?r”
Character Use
? Single character wildcard search.

Example: To search for “text” or “test”, use

te?t
* Multiple character wildcard search.

Example: To search for “test”, “tests”, or “tester”, use

test*
Boolean operators: AND, OR, NOT Multiple character wildcard search.

Example:

(ROOM OR ROOM AND (DESK OR DESKS)) NOT PRICE
Attention: Queries that start with wildcards may cause longer classification load times.

Applying Multiple Rules per Category

You can apply several rules per category. When multiple rules are specified, their queries always have an OR relationship, meaning sentences get categorized if they match at least one of the rules.

The different category rule icons highlighted

  1. Delete a rule using the trash icon.
  2. Add a new rule.
  3. Scroll between rules.
  4. Preview the currently selected rule.

Referencing Categories in Rules

When you reference a category, you can reuse one category’s rules in another category. Referencing works across all category models, so you can share rules between different models in a project. If you make changes to the referenced category, you need to re-run classification on all categories that reference it to apply those changes.

Attention: A single rule can contain up to 30 category references. A chain of category references can have up to 2 links, so for example if category A references category B which references category C.
Qtip: A category cannot reference itself or its parent or child categories.
  1. Click the category that you would like to add the reference to.
    Add a category reference
  2. Click the category reference button above the rule lanes.
  3. Select the model containing the category you would like to reference.
  4. Drag the category into a rule lane to refer to its rules.

Category references have the syntax “catRef” and include the category model and category path.

_catRef:[model:”Model Name” path:”Parent Category” node:”CHILD CATEGORY”]

Once you add a category reference, you can click the “Referring Category Nodes” button above the rule lanes of the category that has been referenced to see all references to that node.

Highlights the category reference button

Attention: You cannot delete a category that has been referenced. All references must be removed before a category can be deleted.

Best Practices

  • Use Ad Hoc Search to explore data and experiment with rules without altering your category model.
  • Fill nodes with basic rules or reuse rules from existing categories.
  • Use Theme Detection to refine results.
  • Filter your data based on structured attributes and system attributes.
  • Use the Source Highlighter to preview a sentence and see which categories the sentence has been assigned to.