Rules are what will determine a text can be categorized into a category. In other words, they define a category's categorization criteria and as such, they are something we are always going to need to define for a specific category.
As we've seen before, we can create a rule directly from the category editing view.
These are the fields available:
Rules designed to exclude a category from the classification should always have a high priority. That way the rule will be run last, ensuring that the category is really excluded from the results.
When a text is categorized, the results will consist of categories ordered by absolute relevance, which in turn is obtained from the weight of the rules triggered for that category.
This is what you will see when you add a rule with "my-first-rule" as label:
For each rule created you will see a small summary of its contents: the definition and both the priority and weight. Also, if the rule is currently activated.
In the first column of the table there are two actions associated to the category:
All the rules created for a category will be shown in the table within the edit category view. The table will show all the fields of the rule; you will be able to select how many rules are visible per page, order them by any of the columns and filter them dynamically by text appearance.
To modify any field defining a rule, you will have to access its editing view. From there, you can modify any of its attributes.
Most of the fields in this view are the same as the ones we've seen for the rule creation. The only additional fields are the ID and the active checkbox. The ID is an alphanumeric ID that identifies the entry univocally. It's composed by 32 characters, and it's generated automatically when the rule is created and cannot be edited. The active checkbox allows to activate/deactivate the rule to see its effect on the categorization. By default, every rule is active on creation.