srlearn.Database¶
- class srlearn.Database[source]¶
Database of examples and facts.
- __init__()[source]¶
Initialize a Database object
A database (in this respect) contains positive examples, negative examples, facts, and is augmented with background knowledge.
The implementation is done with four attributes:
pos,neg,facts, andmodes. Each attribute is a list that may be set by mutating, or loaded from files withDatabase.from_files().Examples
This initializes a Database object, then sets the
posattribute.>>> from srlearn import Database >>> db = Database() >>> db.pos = ["student(alexander)."]