Expand description
HED (Hierarchical Event Descriptors) tag parsing.
BIDS events files may include a HED column containing HED tags that
describe events in a structured, hierarchical vocabulary. This module
provides basic parsing and access to HED tag strings.
See: https://www.hedtags.org/ and https://bids-specification.readthedocs.io/en/stable/appendices/hed.html
§Example
use bids_core::hed::{parse_hed_string, HedTag};
let tags = parse_hed_string("Sensory-event, Visual-presentation, (Item/Object/Man-made/Vehicle/Car, Color/Red)");
assert_eq!(tags.len(), 3);
assert_eq!(tags[0].tag, "Sensory-event");
assert!(tags[2].is_group());Structs§
- HedTag
- A single HED tag or tag group.
Functions§
- extract_
all_ tags - Extract all HED tags from an events TSV column as a flat list of tag strings.
- parse_
hed_ string - Parse a HED annotation string into a list of tags and tag groups.