|
Baby Language Lab Scripts
A collection of data processing tools.
|
This class encapsulates some common static methods used by various parsers. More...

Static Public Member Functions | |
| def | include_seg |
| Checks whether or not a given segment passes all filters in a given list. More... | |
| def | pick_rand_segs |
| Picks n random segments from a list (without duplicates). More... | |
| def | pick_contiguous_segs |
| Picks n consecutive elements from a list. More... | |
| def | hacked_pick_rand_segs |
This class encapsulates some common static methods used by various parsers.
Definition at line 6 of file parser_tools.py.
|
static |
Definition at line 56 of file parser_tools.py.
|
static |
Checks whether or not a given segment passes all filters in a given list.
The filters are run in such a way that any changes they make on the segment or it's utterances are made permanent.
| seg | (Segment) the segment to put through the filters |
| seg_filters | (list) list of SegFilter objects |
Definition at line 12 of file parser_tools.py.
|
static |
Picks n consecutive elements from a list.
| n | (int) number of segments to pick from the given list |
| segs | (list) List of Segment objects to draw from |
Definition at line 47 of file parser_tools.py.
|
static |
Picks n random segments from a list (without duplicates).
| n | (int) number of segments to pick from the given list |
| segs | (list) List of Segment objects to pick from |
Definition at line 30 of file parser_tools.py.