Rule Types and Syntax ===================== PyClause uses conventions for type names and rule formatting from `this publication `_ . Rule Syntax ~~~~~~~~~~~ To load rules with the ``c_clause.Loader`` they must be represented in a structured syntax. An illustrative example of a B-rule string is as follows: .. code-block:: bash has_part(X,Y) <= member_meronym(X,A), hypernym(A,B), derivationally_related_form(Y,B) The **head** and the **body** of a rule are distinguished by the " <= " delimiter, with spaces required on both sides. **Head** The head contains a single atom in the format **rel(X,Y)**, where **rel** is a relation string in the knowledge graph. The head atom may have **X** on the left and **Y** on the right. No other variables appear in the head. Depending on the rule type, **X** or **Y** —but not both— might be replaced with an entity string (a *constant*) or the **Y** is set to **X**. **Body** Atoms within the body are divided using a comma ", " with a required space after it. The two terms within an atom are separated by a "," with no spaces included. Body atoms can also include entitiy strings (constants). Possible variables and entities in an atom can be inferred by the following heuristic: Given the ordering, .. code-block:: python variables = ["A", "B", "C", "D", "E", "F", "G", "H", "I", ...], the following holds for the body atoms: - The atom at position **i=0** contains **variables[0]** and **X** or **Y**, depending on the rule type. - Intermediate atoms, where **0