The graf-python library

The library graf-python is an open source Python implementation to parse and write GrAF/XML files as described in ISO 24612. The parser of the library creates an annotation graph from the files. The user may then query the annotation graph via the API of graf-python.

Example

import graf
gparser = graf.GraphParser()
graph = gparser.parse("filename.hdr") # Looping through the nodes
for node in graph.nodes():
print(node)

Our documentation pages contain more examples how to access GrAF nodes and annotations via the API.

License

The graf-python source code is distributed under the Apache 2.0 License.

Download

Installation

graf-python is also available on PyPI , so you can install via easy_install or pip:

$ easy_install graf-python

To install graf-python from the downloaded package you need to unpack the file and start "setup.py" on the command line. Change to the directory into which you downloaded the package and unpack it:

$ tar xzf graf-python-x.y.z.tar.gz
$ cd graf-python-x.y.z

Then, to install the package locally into your python repository (you may need to have root privileges):

$ python setup.py install

Documentation

Visit our documentation website.

Support and bug reports

You can post comments and questions about graf-python in theĀ Poio User Group. For bug reports pleaseĀ create an issue on Github.

Repository

The graf-python source code is hosted on Github.

Supported by

CIDLeS Homepage

Support Us

CIDLeS on Facebook: cidles.eu/fb