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