Onyx logo

Table Of Contents

Previous topic

onyx.signalprocessing.channel – Channel – an unnecessary abstraction for bootstrapping the processor framework

Next topic

onyx.textdata.tdutil – Some low-level utilities for working with textual data files.

This Page

Textdata

onyx.textdata – The textdata formalisms are used to represent data in human-readable text files.

There are two Python-based implementations of textdata representations. There is the stand-alone Textdata format and the supporting toolset for reading and writing data in this format. There is the Yamldata toolset which has support for reading and writing data using the YAML format. The Yamldata format is preferred. However, the use of YAML by the Yamldata format is strongly influenced by the basic approach used in Textdata. At the client level, the usage of the two sets of tools is almost completely interchangeable.

Textdata is both a format and a set of tools that provide a simple way to unambiguously declare data as space-separated text tokens in line-based records. It was designed to support the diverse needs of researchers to handle text-based data in a more-or-less structured manner. As such, it is minimally intrusive and readily accomodates existing ad hoc plain-text formatting schemes. At the same time, Textdata is well-specified so it is suitable for use as the native serialized representation of complex data structures. Using a small header, it supports data typing and versioning, a configurable comment prefix, and configurable escaping of non-graphical characters.

The Textdata library supports writing and reading textdata, ensuring that well-formed textdata streams are written, verifying correctness when streams are being read, and taking care of idiomatic textdata usage. The Textdata command-line tools can be used to perform common operations on text data. Also, their source code provides real-world examples of how to use the library.

>>> True
True