Use the Rule lab to test and refine your text link analysis (TLA) rules by running
simulations on sample text data.
Before you begin
You must have linguistic resources with TLA rules defined in at least one library to use the
Rule lab.Unlike the other advanced resources, TLA rules
are library-specific. You can only use the TLA rules from one library at a time. You can go to the
Text link rules tab in the Resource Editor to specify
the library that contains the TLA rules that you want to use.
About this task
You can use the Rule lab to test how sample text matches against your TLA rules during extraction
process. By testing smaller samples, you can create new rules and see how your existing rules
perform. You can then refine the rules before processing larger datasets.
Procedure
-
In the Text Analytics Workbench, click .
-
In the Simulation Data dialog, enter the text that you want to test.
Tip: You can click the
Populate icon

to automatically populate the text field with all of the
text examples from every TLA rule in your template. You can then test all of your existing text
patterns against your current rules.
-
Click Run Simulation.
The simulator uses your current extraction settings and linguistic resources to analyze
the text and apply your TLA rules.
-
Review the simulation results in the "Rule lab simulation" pane:
The text that you
enter is parsed into sentences or phrases. The "Rule lab simulation" pane shows the individual
results for each sentence or phrase. You can navigate through the results to see all the sentences
and phrases extracted. The sentence or phrase is highlighted in the pane, and it might also have a
check mark:
- No check mark means that the text sample does not match the example text for any rule.
- A green check mark means that the text sample matches the example text for a TLA rule.
- A red check mark means that the text sample matches the example text for TLA rule, but the
sample also fits the pattern for other rules. You might have duplicate rules, or the rules need to
be refined.
-
Review the first table to see how the tokens were identified and typed.
- Input text token
- Shows each separate word or phrase identified during the extraction process.
- Typed as
- The type assigned to the token. For tokens that are identified as concepts, the associated type
name is shown in this column, such as
<Person> or
<Location>.
- Matching macro
- Any macros from your linguistic resources that matched the token. The matching macro determines
the type assigned.
-
Check the Rules matched table to see which TLA rules matched the
sample:
- Rule set
- The set of rules that the TLA rule is in.
- Rule output
- The name of the TLA rule. You can click it to open the Text links tab and
see the TLA rule.
- Concept 1 and Type 1
- These columns show the associated output values (concept and type pairs) for each matched rule.
The rule also displays the types and matching macros (for example, mPronoun and mTopic).
- Optional:
If you want to generate a new rule based on simulation results, click Generate
rule.
A new TLA rule that is based on the simulation is added. You can click
View
rule in the notification pop-up to view the rule on the
Text
links tab within the
Resource editor tab and make
changes.
After viewing and editing the new rule, you can click Rule lab to
return to the "Rule lab simulation" pane.
What to do next
After modifying rules or changing extraction settings, you can click Test new
simulation to re-test with the same sample data or a different sample. This iterative
process helps you refine your rules until you get the desired results.
When you finish running simulations, you can take some of the following steps:
- Save your changes to the linguistic resources.
- Run a full extraction on your complete dataset to apply the refined rules.
- Review the TLA pattern results on the Text links tab to verify that your
rules produce the expected patterns.