DefExpandGatherer¶
- class DefExpandGatherer(hed_schema, known_defs=None, ambiguous_defs=None, errors=None)[source]
Gather definitions from a series of def-expands, including possibly ambiguous ones.
Notes: The def-dict contains the known definitions. After validation, it also contains resolved definitions. The errors contain the definition contents that are known to be in error. The ambiguous_defs contain the definitions that cannot be resolved based on the data.
Methods
|
Initialize the DefExpandGatherer class. |
|
Process the HED strings containing def-expand tags. |
Attributes
- DefExpandGatherer.__init__(hed_schema, known_defs=None, ambiguous_defs=None, errors=None)[source]¶
Initialize the DefExpandGatherer class.
- Parameters:
hed_schema (HedSchema) – The HED schema to be used for processing.
known_defs (str or list or DefinitionDict) – A dictionary of known definitions.
ambiguous_defs (dict, optional) – A dictionary of ambiguous def-expand definitions.
- DefExpandGatherer.process_def_expands(hed_strings, known_defs=None)[source]¶
Process the HED strings containing def-expand tags.
- Parameters:
hed_strings (pd.Series or list) – A Pandas Series or list of HED strings to be processed.
known_defs (dict, optional) – A dictionary of known definitions to be added.
- Returns:
A tuple containing the DefinitionDict, ambiguous definitions, and errors.
- Return type:
tuple