poioapi.data

This module contains the classes to access annotated data in various formats.

The parsing is done by Builder classes for each file type, i.e. Elan’s .eaf files, Kura’s .xml file, Toolbox’s .txt files etc.

class poioapi.data.DataStructureType(custom_data_hierarchy=None)[source]

Data structure type constructor.

Attributes

name (str) Name of the structure.
data_hirerarchy (array) Structure of the array.

Methods

empty_element() Return the appended list of a certain data hierarchy.
get_children_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
get_parents_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
type_has_region(ann_type) Checks whether the given type has regions that connect it to the base data.
__init__(custom_data_hierarchy=None)[source]

Class’s constructor.....

empty_element()[source]

Return the appended list of a certain data hierarchy.

Returns:

_append_list : array_like

The actual list with the appended elements.

get_children_of_type(ann_type)[source]

Returns all the elements that are above a given type in the type hierarchy.

Parameters:

ann_type : str

Value of the field in the data structure hierarchy.

Returns:

_get_parents_of_type_helper : array_like

The return result depends on the return of the called method.

See also

_get_parents_of_type_helper

get_parents_of_type(ann_type)[source]

Returns all the elements that are above a given type in the type hierarchy.

Parameters:

ann_type : str

Value of the field in the data structure hierarchy.

Returns:

_get_parents_of_type_helper : array_like

The return result depends on the return of the called method.

See also

_get_parents_of_type_helper

type_has_region(ann_type)[source]

Checks whether the given type has regions that connect it to the base data.

Parameters:

ann_type : str

Value of the field in the data structure hierarchy.

Returns:

is_region : bool

Whether the annotation type has regions.

class poioapi.data.DataStructureTypeGraid(custom_data_hierarchy=None)[source]

Data structure type using a GRAID format.

Attributes

name (str) Name of the structure.
data_hirerarchy (array_like) Structure of the array.

Methods

empty_element() Return the appended list of a certain data hierarchy.
get_children_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
get_parents_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
type_has_region(ann_type) Checks whether the given type has regions that connect it to the base data.
class poioapi.data.DataStructureTypeGraidDiana(custom_data_hierarchy=None)[source]

Data structure type using a GRAID format.

Attributes

name (str) Name of the structure.
data_hirerarchy (array_like) Structure of the array.

Methods

empty_element() Return the appended list of a certain data hierarchy.
get_children_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
get_parents_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
type_has_region(ann_type) Checks whether the given type has regions that connect it to the base data.
class poioapi.data.DataStructureTypeMorphsynt(custom_data_hierarchy=None)[source]

Data structure type using a Morphsyntax format.

Attributes

name (str) Name of the structure.
data_hirerarchy (array_like) Structure of the array.

Methods

empty_element() Return the appended list of a certain data hierarchy.
get_children_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
get_parents_of_type(ann_type) Returns all the elements that are above a given type in the type hierarchy.
type_has_region(ann_type) Checks whether the given type has regions that connect it to the base data.