diff --git a/docsrc/source/usage.md b/docsrc/source/usage.md index e5ba0706..14adced1 100644 --- a/docsrc/source/usage.md +++ b/docsrc/source/usage.md @@ -93,7 +93,7 @@ The API follows a hierarchy of interacting components, allowing designers to con from lnn import World formulae = [ - Smoking_causes_Cancer + Smoking_causes_Cancer, Smokers_befriend_Smokers ] model.add_knowledge(*formulae, world=World.AXIOM) @@ -132,7 +132,8 @@ The API follows a hierarchy of interacting components, allowing designers to con 3. Tables of Data ```python from lnn import Fact - + # NOTE: Using .name returns a string, but add_data() expects a Formula object. + # This causes: TypeError: formula expected of type Formula, received str # add data to the model model.add_data({ Friends: { @@ -143,12 +144,12 @@ The API follows a hierarchy of interacting components, allowing designers to con ('Anna', 'Frank'): Fact.TRUE, ('Frank', 'Anna'): Fact.TRUE, ('Bob', 'Chris'): Fact.TRUE}, - Smokes.name: { + Smokes: { 'Anna': Fact.TRUE, 'Edward': Fact.TRUE, 'Frank': Fact.TRUE, 'Gary': Fact.TRUE}, - Cancer.name: { + Cancer: { 'Anna': Fact.TRUE, 'Edward': Fact.TRUE} })