User Manual
Horn rules stating dependencies over Knowledge Graph can be used for identifying errors or adding new facts. For example, the rule child(object,subject) → parent(subject,object) states that if person A is child of person B, then B is parent of A. This type of rules is called positive rules and it aims to enrich the Knowledge Bases with new facts, while the opposite type - negative rules - is used to detect errors. If a set of triples in a graph satisfies a negative rule, then there must be at least one incorrect triple among them. For example, the rule child(subject,object) & birthYear(subject,v0) & birthYear(object,v1) & >(v0,v1) → ⊥ states that parents cannot be younger than their children.
There are different algorithms to discover horn rules over Knowledge Bases, as a consequence there are many rules generated from many experiments over time. With the aim to store and share discovered rules as well as to expose them with metadata, RuleHub allows users to easily search for rules, add new rules, and export them in different formats.
1. Show rules
Displays rules in the system with following information:
- id: the rule internal identifier.
- knowledge_graph: the knowledge graph in which the rule is valid.
- rule_type: true or false corresponds to positive or negative rule.
- predicate: the target predicate.
- premise: the rule body.
- hashcode: it is computed from the predicate and rule premise, it is used to check uniqueness of rules in the system.
- human_confidence: indicates the human confidence. This score is calculated based on the evaluation on a sample of instances of the corresponding rule.
- computed_confidence: indicates the support score. This score is computed automatically.
- source: indicates the rule's origin. Rule can be added by users or obtained from a discovery system.
- configuration: configuration of the mining system that found the rule.
- quality_evaluation: subjective human evaluation. From 1 to 5, the higher value the lower quality.
Allows users query rules based on following criteria:
- knowledge_graph
- predicate
- rule_type
- human_confidence
Rules by default display in a table with 5 columns: rule type, rule content, quality evaluation, human confidence and computed confidence. To view all information of a rule, users can click on its content.
Provides addition features on found rules:
- Ascending sort and descending sort on resulted rules
- Refine the list of result based on a search key word
- Get the SPARQL query corresponding to a rule
- Download the instances sample of a rule (up to 20 instances) as a JSON file.
- Edit the human confidence of a rule. Changes in this page don't effect immediately. They will be recorded as users' votes and will be considered by administrators.
- Edit the quality evaluation of a rule. Changes in this page don't effect immediately. They will be recorded as users' votes and will be considered by administrators.
- Download selected rules as a JSON file.
2. Add rules
To enrich our rules database, we allow anonymous users to add rules into the system with following mandatory information:
- Knowledge Base
- Predicate
- Rule type
- Premise
- Human Confidence
- Quality Evaluation
The system firstly checks if this rule exists in the corpus or not. If this is a new rule, it will automatically calculate the support score based on the number of matching cases and not-matching cases over the corresponding Knowledge Base, then store it into the database as invalid rules. Therefore these rules will not be displayed in the Show Rules tab until they are approved by the administrators.
3. Rule Administration
Only accessible by administrators of the site.
3.1. Export rules
A shortcut to quickly export all valid rules in the corpus in JSON format.
3.2. Import rules
Import massive rules to the corpus. Administrators must specify the source (AMIE or RuDik), then they can import rules into the system using following format.
Rules without the support score will be calculated automatically, otherwise using the score provided in the file. Existing rules will be ignored.
3.3. Rule Management
Where the administrators can approve and edit scores for rules. Changes here will be up-dated into the database immediately.
Similar to the Show Rules tab, it provides criteria for searching rules.
- Knowledge Base
- Predicate
- Rule Type
- Human Confidence
- Rule Status
Features provided in the results:
- Approve/Cancel a rule
- Edit the human confidence of a rule. Changes in this page effect immediately
- Edit the quality evaluation of a rule. Changes in this page effect immediately
- View and evaluate sample of a rule