Parameters for Taxonomy Logic

Scope tells Stratifyd the level at which to apply the logic. Valid values are as follows.

  • Sentence: By default, logic is applied at the sentence level. This ensures that it finds words in a specific context.
  • Paragraph: Select this to apply the matching logic at the paragraph level.
  • Document: Select this to apply the matching logic at the level of each record. This is a more generalized way to include only documents that match a specific word.

Logic tells Stratifyd how to determine whether data is funneled into this label. Valid values are as follows.

  • Any: The default logic container for any label uses the Any logic. Use this to match data that includes any of the words listed in the container.
  • All: Create a new logic container with the All logic to match only data that includes all of the words listed in the container.
  • None: Create a new logic container with the None logic to match only data that includes none of the words listed in the container.

Syntax

Each rule in your taxonomy should be separated by commas and will follow the logic of the container that it's in (ALL, NONE, ANY). You can use the following syntax to create more advanced taxonomy rules.

Rule type: Simple

  • Syntax: None
  • Use: Simply writing service in your taxonomy logic container will match any data with the word "service"

Rule type: Single-character wildcard

  • Syntax: ?
  • Use: Use the question mark to create a single-character wildcard, e.g. rec??ve matches both “receive” and “recieve.”

Rule type: Multi-character wildcard

  • Syntax: *
  • Use: Use the asterisk to create a multi-character wildcard, e.g. app* matches "application" and "app" and "apple."

Rule type: Padded logic

  • Syntax: termone~#~termtwo
    example: uninstalled~2~reinstalled
  • Use: Use the tilde and specify a number to indicate the maximum number of words to allow between the two words, e.g. uninstalled~2~reinstalled matches “uninstalled and then reinstalled,” but not “uninstalled and then later I reinstalled.”

Rule type: Boolean logic

  • Syntax: (service + (good | great))
  • Use: Use parentheses to set precedence, e.g. ((uninstalled | reinstalled) + app) matches "uninstalled app" and "reinstalled app," but not "uninstalled and reinstalled app."
    Note: Most cases can be covered using the different logic containers (ALL, NONE, ANY), so use this syntax sparingly as it can make troubleshooting your taxonomy more difficult if you see unexpected results

Rule type: Structured data match

  • Syntax: {value_to_match:@:column_header_name}
  • Use: Use braces to specify a value to match in a structured data field on the same record, e.g. {true:@:VerifiedBuyer} matches only records where the reviewer is a verified buyer of the product.

Rule type: Exact match

  • Syntax: "exactly this phrase*"
  • Use: If you need to match any characters that are reserved for special syntax, you can use double quotes to bypass the syntax to match the special characters in your data. For example if you want to match a literal question mark instead of using it as a single-character wildcard, then putting it inside double quotes (e.g. "why?") will match the phrase and the question mark character in your data.

To create a logic container

1. In the Taxonomy Editor, in the Labels panel to the left, select the label to which you want to add a logic container. By default, each label has one empty logic container with these settings.

Scope: Sentence

Logic: Any

2. Optionally change the scope to Paragraph or Document, but Sentence level is a reasonable setting for most purposes.

3. Click in the box next to the number 1, and begin adding words or phrases to signal to Stratifyd that a sentence (or paragraph or document) belongs under this label.
Separate words or phrases with commas, and use other syntax from the table above as needed.

4. Notice that in the Labels panel to the left, the label to which you added logic renders in yellow text and has an M for "modified" to its right, and any parent label renders in yellow text with a dot to its right to indicate that there are unsaved changes. Click Save.

The text color reverts to white, and a message indicates that the taxonomy changes were saved.

To add a new logic container

1. Below the existing logic container, click New logic container and select the type of logic to use.

2. As with the first logic container, optionally change the scope to Paragraph or Document.

3. Click in the box next to the number 1, and add comma-separated words or phrases as before, and click Save when you have finished.

You can collapse logic containers that you are not using to simplify the view.


Did this answer your question?