🔌 Application Programming Interface#
SLF Data reader.
- class SLFDataReader#
Bases:
object
̀`SLF`` Data reader.
Example
>>> from pprint import pprint >>> from galactic.io.data.slf import SLFDataReader >>> reader = SLFDataReader() >>> import io >>> data = ''' ... [Lattice] ... 2 ... 3 ... [Objects] ... 1 2 ... [Attributes] ... a b c ... [Relation] ... 0 1 0 ... 1 1 0 ... '''.strip() >>> individuals = reader.read(io.StringIO(data)) >>> pprint({key: sorted(list(value)) for key, value in individuals.items()}) {'1': ['b'], '2': ['a', 'b']}