You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/world_reasoner.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
from os.path import dirname
2
-
3
1
# World Reasoner
4
2
5
3
The world reasoner {py:class}`semantic_digital_twin.reasoner.WorldReasoner` is a class that uses [Ripple Down Rules](https://github.com/AbdelrhmanBassiouny/ripple_down_rules/tree/main)
@@ -22,7 +20,7 @@ world.
22
20
For example lets say the reasoner now has rules that enable it find specific types of semantic annotations like the Drawer and the Cabinet.
23
21
The way to use the reasoner is like the following example:
24
22
25
-
```python
23
+
```{code-cell} ipython3
26
24
from os.path import join, dirname
27
25
from semantic_digital_twin.reasoning.world_reasoner import WorldReasoner
28
26
from semantic_digital_twin.adapters.urdf import URDFParser
@@ -50,7 +48,7 @@ more attributes of the world.
50
48
51
49
For example, let's say you want to improve an existing rule that classifies Drawers, you can do that as follows:
52
50
53
-
```python
51
+
```{code-cell} ipython3
54
52
from os.path import join, dirname
55
53
from semantic_digital_twin.reasoning.world_reasoner import WorldReasoner
56
54
from semantic_digital_twin.adapters.urdf import URDFParser
@@ -83,7 +81,7 @@ Open the Template File in Editor from the Ipython Shell.
83
81
Now, a template file with some imports and an empty function is openned for you to write your rule inside the body of
84
82
the function as shown bellow:
85
83
86
-
```python
84
+
```{code-cell} ipython3
87
85
from dataclasses import dataclass, field
88
86
from posixpath import dirname
89
87
from typing_extensions import Any, Callable, ClassVar, Dict, List, Optional, Type, Union
0 commit comments