![]() |
Baby Language Lab Scripts
A collection of data processing tools.
|
Parses Segment objects out a CSV file (one segment per row). More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | parse |
Parses the CSV file row by row, generating Segment objects. More... | |
Public Attributes | |
logger | |
filename | |
segments | |
parsed | |
Private Member Functions | |
def | _parse |
Goes through the file row by row. More... | |
Parses Segment objects out a CSV file (one segment per row).
Each row must contain the columns "Elapsed_Time, Segment_Duration, Speaker_ID".
Definition at line 13 of file csv_parser.py.
def parsers.csv_parser.CSVParser.__init__ | ( | self, | |
filename | |||
) |
Constructor.
self | |
filename | (string) full path to csv file to parse |
Definition at line 17 of file csv_parser.py.
|
private |
Goes through the file row by row.
Definition at line 40 of file csv_parser.py.
def parsers.csv_parser.CSVParser.parse | ( | self, | |
progress_update_fcn = None , |
|||
seg_filters = [] |
|||
) |
Parses the CSV file row by row, generating Segment objects.
self | |
progress_update_fcn | (function=None) function that updates the progress bar, accepting a single parameter, a real number in [0.0, 1.0] |
seg_filters | (list=[]) list of SegFilter objects. These filters are applied to the internal segments list in a permanent manner (i.e. anything they filter out will not be returned by this parser) |
Definition at line 28 of file csv_parser.py.
parsers.csv_parser.CSVParser.filename |
Definition at line 19 of file csv_parser.py.
parsers.csv_parser.CSVParser.logger |
Definition at line 18 of file csv_parser.py.
parsers.csv_parser.CSVParser.parsed |
Definition at line 21 of file csv_parser.py.
parsers.csv_parser.CSVParser.segments |
Definition at line 20 of file csv_parser.py.