6 A simple way of creating atoms in the AtomSpace.
7 See also create_stoms_by_type.py for an alternate API for atoms.
10 from opencog.atomspace
import AtomSpace, TruthValue, Atom
11 from opencog.atomspace
import types
17 set_type_ctor_atomspace(a)
20 TV = TruthValue(1, 0.8)
26 A = ConceptNode(
'Apple', TV)
27 B = ConceptNode(
'Berry', TruthValue(0.5, 0.75))
28 C = ConceptNode(
'Comestible', TV)
36 AB = InheritanceLink(A, B, TV)
37 BC = InheritanceLink(B, C, TV)
38 AC = InheritanceLink(A, C)
41 print "The atomspace contains:\n\n", a.get_atoms_by_type(types.Atom)