graph-based processing of multi-level annotated corpora using NetworkX